X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C569F50.6D553AA1@NOSPPAMhotmail.com> Date: Tue, 29 Jan 2002 14:10:40 +0100 From: David Leben X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-6.1.1 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: C or C++? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 58 NNTP-Posting-Host: nat.be.acunia.com X-Trace: 1012309840 read-nat.news.be.uu.net 12221 194.7.211.211 X-Complaints-To: abuse AT be DOT uu DOT net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jeroen Vandezande wrote: > I am learning C and will soon convert at my work my old Turbo Pascal Progs > to C/C++ > but what should I use C or C++? > A friend told me NOT to use C++ if I was not going to use Classes and > Objects... but just use C... Hi, I'm that friend :-) And I want to add some points to this discussion. Some things other people said: Gautier wrote: > Try both and don't trust your friends: He doesn't, that's why he posted here :-) > they always will > recommend the language they are using most. No, I used both C and C++ in the past, amongst various other languages. Nowadays I'm a full-time Java programmer. Eli Zaretskii wrote: > > "Except for minor details, C++ is a superset of the C programming > > language." > > Those ``minor differences'' make a world of difference in some > cases. For details and some examples, see section 8.4 of the DJGPP > FAQ list. That section only talks about //-style comments. These comments are not standard C, but some compilers (like DJGPP) do support them. Last quote: one2001boy wrote: > C is for low-level system programming and embedded systems; > Ch is for script computing > C++ is for large-scale projects; And this brings up my most important point: Jeroen did not mention in his question what he is working on. He is programming on embedded systems. It's not the lowest level, the machine he is working on uses a "PC on a chip," with some 486-compatible processor. Considering this, and the fact he was not going to use OO-features like classes, I advised him to use plain C. I thought this would be more easy to learn, and as C is (+/-) a subset of C++, he can always evolve to C++ later on. I also thought C code would generate smaller and/or faster code (correct me if I'm wrong), which would be for the benefit of an embedded system. Regards, David.