Wrong function invoked by VC++

Hi, how can I "tell" VC++ which function am I invoking, when there are other functions with the same name?

For example, I want to use the SetForegroundWindow(HWND hWnd) function. If you check in the MSDN library, there are two function with similar names:
ii)SetForegroundWindow(HWND hWnd)

How do I invoke function number ii)?
VC++ always shows an error because it thinks that I am using function i). I did include the parameter in the function call.



  • Ok now. I have found the answer to my question.

    Use the scope resolution operator (::) before the function name, to tell the compiler to look for the function name in the global name space.

    For example:


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion