Double :: ?

What does the "::" mean in front of GetPrivateProfileString?
    ::GetPrivateProfileString("SECTION", "Area", "", szBuffer, sizeof(szBuffer), "MY.INI");
Who is Participating?

Improve company productivity with a Business Account.Sign Up

bcladdConnect With a Mentor Commented:
In C++ the same name can appear in different scopes: namespace, class, struct. So:

int someFunciton() {
  // global scope

class A {
  int someFunction() {
    // in the scope of class A
    // RIGHT HERE: How could you call the global function?
    // Specify the scope of the function as in

the full name of the inner function is A::someFunction. The :: with nothing in front of it refers to the global scope.

HTH, -bcl
venkateshwarrConnect With a Mentor Commented:
It is called "scope resolution operator", used to resolve the scope of the function GetPrivateProfileString
sticarAuthor Commented:
resolve the scope?  meaning?
sticarAuthor Commented:
Ok... Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.