namespace

V

Victor Bazarov

prasat said:
What does namespace signify in C++

It signifies space for names. Names declared in a namespace
are visible inside that namespace only if you don't use any
special name resolution constructs.

Victor
 
T

tom_usenet

If you want to teach English <comma> you should go to a different NG.
Here we speak and write C++ <no comma> if that's what others ask of us.

Nevertheless, this statement is false:

"Names declared in a namespace
are visible inside that namespace only if you don't use any
special name resolution constructs."

Counter example:

namespace A
{
int i;
int j = ::A::i; //finds ::A::i fine.
};

Whereas this one is true, just about:

"Names declared in a namespace
are visible inside that namespace only, if you don't use any
special name resolution constructs."

or better:

"Names declared in a namespace
are visible inside that namespace only, unless you use
special name resolution constructs."

I think that's what you meant, anyway.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top