[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: g++ linker error

Previously Stephen R. Gore wrote:
> If you use '#include<iostream>', you must also use 'namespace std;' at the
> end of the includes block.

This is of course really bad codingstyle, as well as slightly incorrect.
Including a complete namespace shouldn't be done if at all possible..

> I can't comment on the correctness, but namespace std is the new standard.
> New compilers support .h headers as a backward compatibility feature.

Indeed. The .h headers don't put things in the std-namespace, which means
you can possibly mess up your own namespace. Unfortunately at this moment
libstdc++ doesn't support namespaces yet, so we'll have to wait until
libstdc++v3 is released.


 / Generally uninteresting signature - ignore at your convenience  \            
| wichert@liacs.nl                    http://www.liacs.nl/~wichert/ |           
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |           

Reply to: