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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of vtable.

716


What is a null object in c++?

740


Does c++ have foreach?

626


Is arr and &arr are same expression for an array?

684


What is code reusability in c++?

778






Describe the advantages of operator overloading?

669


What is boyce codd normal form in c++?

792


What is #include cmath?

734


Describe the process of creation and destruction of a derived class object?

740


What is difference between c++ 11 and c++ 14?

661


Do inline functions improve performance?

737


What is fixed in c++?

659


What do you mean by inheritance in c++? Explain its types.

708


Can you overload the operator+ for short integers?

689


Why do we use iterators?

720