Exforsys
+ Reply to Thread
Results 1 to 3 of 3

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++??...

  1. #1
    Manyamanas is offline Member Array
    Join Date
    Dec 2010
    Answers
    32

    operator

    what is the function of scope resolution operator in c++??


  2. #2
    techvinny is offline Moderator Array
    Join Date
    Dec 2010
    Answers
    56
    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!!!


  3. #3
    Sandhya.Kishannag is offline Member Array
    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



Latest Article

Network Security Risk Assessment and Measurement

Read More...