It is very surprising ....

J

janek

So please, look into Stroustrup's "The C++ Programming Language" (AT&T
1997), where in the Introduction a very similar code to mine is
placed.



Janek
 
K

Karl Heinz Buchegger

janek said:
So please, look into Stroustrup's "The C++ Programming Language" (AT&T
1997), where in the Introduction a very similar code to mine is
placed.

Janek

What are you talking about?

Please note: The regulars work though dozends of postings each day.
At least I don't know every post by heart that I see each day and by
whom it was posted. So a little bit of context of what you are talking
about is always a good idea.
 
R

red floyd

Karl said:
What are you talking about?

Please note: The regulars work though dozends of postings each day.
At least I don't know every post by heart that I see each day and by
whom it was posted. So a little bit of context of what you are talking
about is always a good idea.

Karl, I did a search for "janek" in my Google Groups. The only post
from 2005 would be the one about namespace vs. class.

To answer Janek's (presumed) question: 1997 is pre-Standard. That
particular edition of TCPPL didn't discuss namespaces properly.
Pre-Standard, the only way to create global data items in their own
namespace was to make them static members of a class.
 
I

Ioannis Vranos

red said:
Karl, I did a search for "janek" in my Google Groups. The only post
from 2005 would be the one about namespace vs. class.

To answer Janek's (presumed) question: 1997 is pre-Standard. That
particular edition of TCPPL didn't discuss namespaces properly.
Pre-Standard, the only way to create global data items in their own
namespace was to make them static members of a class.


Actually it is TC++PL 3. Well FDIS was in November 14, 1997 (the
finished content) so we can say it is not pre-standard. Perhaps
Stroustrup himself may shed some light on this (if there were
"pre-standard/non-standard things in the first printing of the book),
however I do not think so.

The answer to OP is that a class is a type, while a namespace is a scope
for grouping related facilities, including classes themselves.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top