Computer Science, asked by TbiaSamishta, 1 year ago

Write a brief note on scope resolution operator (: :)?

Answers

Answered by dhanashreep5
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