From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: Help! Date: Sat, 21 Oct 2000 19:44:33 GMT Organization: always disorganized Lines: 46 Message-ID: <39f1f21d.44293006@news.freeserve.net> References: <000401c03b8b$10079840$0500a8c0 AT brk> NNTP-Posting-Host: modem-59.blue-star-damsel.dialup.pol.co.uk X-Trace: newsg1.svr.pol.co.uk 972157474 24489 62.136.240.59 (21 Oct 2000 19:44:34 GMT) NNTP-Posting-Date: 21 Oct 2000 19:44:34 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Johan Henriksson wrote: > >> >Why go to all the trouble of learning C++ if all you want to learn > >> >is C? > >> * You can read ~100% more sources to others apps > >True, but by that logic you should also learn Java, Perl, etc., > >while you're at it, then you could read even more sources. > I'd suggest learning basic as well. Then you have most languages covered. Who uses Basic? :) Looking at the projects on SourceForge (http://sourceforge.net) the six most popular languages at the moment appear to be the following. (The figures are the number of SourceForge projects using these langauges.) 2297 C 1769 C++ 957 Java 933 Perl 674 PHP 400 Python > >A C++ compiler will choke on > > char *ptr = malloc(9); > >although this is fine in C. > > Is it? Didn't know it was legal with such init's. I meant inside a function, otherwise it's obviously not allowed. The problem C++ has with the above is that malloc() returns void*, which is not the same as the type of ptr. > >There are other differences, but I can't remember them all at the > >moment. Somewhere there is a web page listing differences, but > >I've lost the URL. > :( I've found this: http://home.flash.net/~dtribble/text/cdiffs.htm Unfortunately, it compares C++ with C99 instead of C90. Since there are currently no compilers that support C99 this isn't very useful. (C99 has lots of things that C++ lacks. See also http://x51.deja.com/getdoc.xp?AN=660927816 - although there are a few mistakes there.)