Write a brief note on scope resolution operator (: :)?
Answers
Answered by
0
The :: (scope resolution) operator is used to get hidden names due to variable scopes so that you can still use them. The scope resolution operator can be used as both unary and binary. You can use the unary scope operator if a namespace scope or global scope name is hidden by a particular declaration of an equivalent name during a block or class. For example, if you have a global variable of name my_var and a local variable of name my_var, to access global my_var, you'll need to use the scope resolution operator.
Similar questions
Biology,
7 months ago
Science,
7 months ago
Accountancy,
7 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
Business Studies,
1 year ago
Business Studies,
1 year ago