namespace

Discussion in 'C++' started by prasat, Aug 19, 2003.

  1. prasat

    prasat Guest

    prasat, Aug 19, 2003
    #1
    1. Advertising

  2. "prasat" <> 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
    Victor Bazarov, Aug 19, 2003
    #2
    1. Advertising

  3. prasat

    Buster Guest

    "Victor Bazarov" <> wrote in message
    news:Mur0b.151736$...
    > "prasat" <> 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
    Buster, Aug 19, 2003
    #3
  4. "Buster" <> wrote...
    >
    > "Victor Bazarov" <> wrote in message
    > news:Mur0b.151736$...
    > > "prasat" <> 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
    Victor Bazarov, Aug 19, 2003
    #4
  5. prasat

    tom_usenet Guest

    On Tue, 19 Aug 2003 16:07:21 GMT, "Victor Bazarov"
    <> wrote:

    >"Buster" <> wrote...
    >>
    >> "Victor Bazarov" <> wrote in message
    >> news:Mur0b.151736$...
    >> > "prasat" <> 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
    tom_usenet, Aug 19, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Èý¹â
    Replies:
    1
    Views:
    555
    William F. Robertson, Jr.
    Jul 29, 2003
  2. Replies:
    0
    Views:
    5,110
  3. Anonymous
    Replies:
    3
    Views:
    513
    Ron Natalie
    Aug 18, 2003
  4. Jason Heyes
    Replies:
    1
    Views:
    438
    Woebegone
    Nov 19, 2004
  5. Petter Reinholdtsen
    Replies:
    9
    Views:
    4,339
    Howard
    Nov 29, 2004
Loading...

Share This Page