PDA

View Full Version : C vs C++



MovingFulcrum
09-07-2001, 07:58 AM
C has the speed and the small exe file size advantage over C++ while C++ allows development faster through MFC and OOP stuff in it while givign u slow and bloated code.
Which one do u prefer and why?

Post something sensible here.

RobS
09-07-2001, 08:03 AM
At work
Depends on the target and requirements.
Most of projects at the moment are either size or speed constrained so I'd say C, but in month I might be on huge windows applications and I'll change my mind. I'm fickle like that.

Personally, I still think more procedurely than OO so I'd probably say C, but I'm trying to retrain my brain.

he says whilst shufflling to try and get that fence he's sitting on comfortable

Govtcheez
09-07-2001, 08:08 AM
I'll go with RobS on this one. C++ has its advantages, but sometimes you don't have a choice. I develop in C at work because there's no alternative. I use C++ at home because it's much easier to find free C++ compilers online than it is to find free C compilers (or maybe I'm just lazy). However, I'd code in VB, Java, BASIC, or whatever if that's what would get the job done best. I'd probably teach a squirrel to do it if I thought the job would be better or easier.

Fordy
09-07-2001, 08:20 AM
I just cant set my mind to avoid the procedure-like workings of C. I took up java in part to help me with the transition to c++ - I'm fine with the java, but with C++ - no luck yet. Its not that I cant do it, its just I am so used to C. Yesterday I had to build a file filter on the fly to help me with another project. Did I use this oppertunity to force myself to think OOP - not at all.

RobS
09-07-2001, 08:34 AM
"I just cant set my mind to avoid the procedure-like workings of C. "

thank god its not just me then

A whole heap of my work stuff is in LabView, it's all graphical and data flow (pretty but makes huge memory hungry applications) learning to think in pictures was fun, it's alledgedly forces OO down your throat but if it does I can't see what I'm doing differently and if I am how to port it back.

UML course next week at work though, perhaps that'll help.

Stoned_Coder
09-07-2001, 09:19 AM
I pretty much always use c++ rather than c. I can use c++ to program procedurally if i so wish.When doing win32 api stuff I prefer that style of c++ to the much more object oriented style of MFC. I am currently in the process of writing some nice wrapper classes for parts of the api that are not similar to mfc but more like vxcl. If you don't know about vxcl then go here to find out more. (www.toddtown.com)