?
Solved

Double :: ?

Posted on 2004-03-30
4
Medium Priority
?
202 Views
Last Modified: 2010-04-01
What does the "::" mean in front of GetPrivateProfileString?
    ::GetPrivateProfileString("SECTION", "Area", "", szBuffer, sizeof(szBuffer), "MY.INI");
0
Comment
Question by:sticar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Assisted Solution

by:venkateshwarr
venkateshwarr earned 200 total points
ID: 10716614
It is called "scope resolution operator", used to resolve the scope of the function GetPrivateProfileString
0
 

Author Comment

by:sticar
ID: 10716622
resolve the scope?  meaning?
0
 
LVL 11

Accepted Solution

by:
bcladd earned 300 total points
ID: 10716695
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
    ::someFunction();
  }
};

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

HTH, -bcl
0
 

Author Comment

by:sticar
ID: 10717561
Ok... Thanks!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question