How can a '::' operator be used as unary operator?



How can a '::' operator be used as unary operator?..

Answer / subham chaudhary

The scope operator can be used to refer to members of the global namespace. Because the global namespace doesn’t have a name, the notation :: member-name refers to a member of the global namespace. This can be useful for referring to members of global namespace whose names have been hidden by names declared in nested local scope. Unless we specify to the compiler in which namespace to search for a declaration, the compiler simple searches the current scope, and any scopes in which the current scope is nested, to find the declaration for the name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is meant by forward referencing and when should it be used?

0 Answers  


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

0 Answers  


What is the use of bit fields in structure declaration?

0 Answers  


What do you mean by translation unit in c++?

1 Answers  


When are exception objects created?

0 Answers  






what are the decision making statements in C++? Explain if statement with an example?

0 Answers  


what are function pointers?

0 Answers  


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

0 Answers   TCS,


Does a derived class inherit or doesn't inherit?

0 Answers  


What is a hashmap c++?

0 Answers  


What is the size of a vector?

0 Answers  


how to create window program in c++.please explain.

1 Answers   Microsoft,


Categories