By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,192 Members | 802 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,192 IT Pros & Developers. It's quick & easy.

namespace

P: n/a

What does namespace signify in C++
--
Posted via http://dbforums.com
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"prasat" <me*********@dbforums.com> wrote...

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
Jul 19 '05 #2

P: n/a

"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:Mu********************@rwcrnsc51.ops.asp.att. net...
"prasat" <me*********@dbforums.com> wrote...

What does namespace signify in C++

It signifies space for names. Names declared in a namespace
are visible inside that namespace only


I think you need a comma here ... <g>
if you don't use any
special name resolution constructs.

Victor

Jul 19 '05 #3

P: n/a
"Buster" <no***@nowhere.com> wrote...

"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:Mu********************@rwcrnsc51.ops.asp.att. net...
"prasat" <me*********@dbforums.com> wrote...

What does namespace signify in C++

It signifies space for names. Names declared in a namespace
are visible inside that namespace only


I think you need a comma here ... <g>


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.
if you don't use any
special name resolution constructs.

Victor

Jul 19 '05 #4

P: n/a
On Tue, 19 Aug 2003 16:07:21 GMT, "Victor Bazarov"
<v.********@attAbi.com> wrote:
"Buster" <no***@nowhere.com> wrote...

"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:Mu********************@rwcrnsc51.ops.asp.att. net...
> "prasat" <me*********@dbforums.com> wrote...
> >
> > What does namespace signify in C++
> >
>
> It signifies space for names. Names declared in a namespace
> are visible inside that namespace only


I think you need a comma here ... <g>


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
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.