
- Forum
- Programming Talk
- C and C++
- operator
operator
This is a discussion on operator within the C and C++ forums, part of the Programming Talk category; what is the function of scope resolution operator in c++??...
-
12-26-2010, 02:22 AM #1
- Join Date
- Dec 2010
- Answers
- 32
operator
what is the function of scope resolution operator in c++??
-
The scope resolution operator :: is used to qualify the member variable or the member function with the class that it belongs to.
Check out,
How to Access C++ Class Members
HTH!!!
-
02-23-2012, 08:52 AM #3
- Join Date
- Feb 2012
- Answers
- 66
The scope resolution operator tells the compiler to use the global identifier rather than the local identifier by prefixing the identifier with ::, the scope resolution operator.It is also used to define the already declared member functions of a particular class.The resolution operator is also used to resolve the scope of a variable when the same identifier is used to represent a global variable, a local variable, and members of one or more class(es).If the resolution operator is placed in front of the variable name then the global variable is referenced. When no resolution operator is placed then the local variable is referenced.If the resolution operator is placed between the class name and the data member belonging to the class then the data name belonging to the particular class is referenced.
-
Sponsored Ads
«
Data types
|
keyword
»

Reply With Quote





