That is the scope specifier.
There is more information here.
C++ names can be used only in certain regions of a program. This area is called the "scope" of the name. Scope determines the "lifetime" of a name that does not denote an object of static extent. Scope also determines the visibility of a name, when class constructors and destructors are called, and when variables local to the scope are initialized. (For more information, see Constructors and Destructors.) There are five kinds of scope:
- Function scope
- File scope
- Class scope
- Prototype scope
Read those articles for more information.
There are lots of tutorials about scope too.
A scope is a region of the program and broadly speaking there are three places, where variables can be declared −
Inside a function or a block which is called local variables,
In the definition of function parameters which is called formal parameters.
Outside of all functions which is called global variables.
I should point out that the same rules apply for functions. So if a function is defined in, for example, CDialog
, and you want the global version and not the CDialog
version, you use ::
to access the global version.