[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] c++ & mem
> I see your point, but I think you're missing the big point in the
> thread. Since C++ is a superset of C, blocks of code in C style can
> be used where (a) efficiency is extremely important or (b) it's
> convenient for some reason.
Old code, yes, efficient code? I don't think I necessarily agree with that.
Efficient, maybe, if the coder is a C coder who doesn't do so much C++. C++
overall is generally much nicer to streamline than C code.
> The original poster happened to want to test whether he could get a
> working program built with g++; a C-style hello world program is
> perfectly appropriate for that.
No, I disagree completely. If you're planning on programming in C++, you
need to test the compiler *with* C++, not C - that means the libraries, etc.
If you compile that C hello world, it means you have C dev libraries
installed. Woopee-doo. That's no use if you want to program C++ eventually.
g++ is gcc anyway, so if you've compiled things on your system before,
compiling that program tells you nothing.
> The only problem is that language
> bigots will take you to ask for using stdout instead of cout.
Not necessarily. They might take you to task for using cio rather than
iostreams, but that's another matter ;)
Cheers,
Alex.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.