1 Feb 02:49
Re: NOTE to C++ programming
Sam Varshavchik <mrsam <at> courier-mta.com>
2003-02-01 01:49:00 GMT
2003-02-01 01:49:00 GMT
Ed Sweetman writes: > Ed Sweetman wrote: >> namespace declarations do not go in header files. Period. I thought they >> taught that in intro C++ courses. It causes namespace pollution. I'm >> reverting all namespace additions to headerfiles, compiling ...seeing if >> that happens to work now since it wont compile as it is, then adding the >> namespace std lines in the appropriate places in the source files and >> testing that. >> > > > > Give me a few more hours.. I should have the entire unix/shared source > tree converted to the way stl is supposed to be used. I'll be touching > just about every file so i'll probably have to commit the changes in > chunks. This is very good news. Although I haven't had a chance to look at Zinf sources lately, I recall that I was able to get the last public release of Zinf compiled with gcc 3.2, although it spit out a bucketful of warnings, due to namespace issues. Converting pre-ISO/C++ code to the new STL and ISO/C++ namespacing is certainly a painful experience. I've gone through it myself with several large chunks of code. My general approach usually goes something like this: * Fix all the includes: iostream.h >iostream, etc... Nothing will compile now.(Continue reading)
RSS Feed