Solved

Double :: ?

Posted on 2004-03-30
4
199 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 50 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 75 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

730 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