Scope Resolution Operator
Scope Resolution Operator Blocks and scopes are often used in the programming languages. we also know that the same variable names can be used to have different meaning in different blocks. the scope of the variable is from the point of the deceleration to the end of the block containing the deceleration, a variable declared in a block is said as local to that block. For example. ... { x = 10; ... ... } ... ... { int x = 20; ... ... } In the above two blocks the x declared are two different variables at different memory location, we can not access the the variable outside the block or the other variable in side the different block. The Scope resolution operator is used for many other purpose, which are listed below: For accessing the global variable when there is a local variable with the same name. Defining the function outside the class. Accessing a class’s static variables. Referring to a class inside another class. In case of mult...