Campus interview zone
Would you like to react to this message? Create an account in a few clicks or log in to continue.

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

Go down

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

Post  Admin Sun Jan 31, 2010 5:48 pm

Answer:
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.

Admin
Admin

Posts : 71
Join date : 2010-01-21

http://campus-interview.co.cc

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum