C++ Compiling Problems

John Summerfied debian at herakles.homelinux.org
Tue May 24 09:49:20 UTC 2005


Rick wrote:

>> C++ is another matter altogether, and provided programmers use the C++ 
>> features, code written in C++ is likely to be more reliable than 
>> equivalent code written by equivalently-capable C programmers.
>>
>>
> Seems like an odd thing to say, you make it sound like C & C++ are 
> entirley different languages. C++ is C with some additional commands to 
> make handling objects easier and a stricter compiler. C++ doesn't do 
> strings in the same sense that C doesn't.

Not all valid C constructs are valid C++, and lots of C++ isn't in C.

C++ does have strings:
#include <string>
string Zonker("Harris"); // here's a string
/*
and now it's the compiler (and library) that has to keep track of 
Zonker's length, to worry about overflow etc.
*/
Zonker = "Zonker " + Zonker;

-- 

Cheers
John

-- spambait
1aaaaaaa at computerdatasafe.com.au  Z1aaaaaaa at computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/




More information about the fedora-list mailing list