Sponsored Content
Full Discussion: How much different?
Top Forums Programming How much different? Post 45636 by cbkihong on Saturday 27th of December 2003 03:57:42 AM
Old 12-27-2003
Re: How much different?

Quote:
Originally posted by Zivux
From what I have read so far C is more powerful but C++ is easier.
C++ encourages you to take on an object-oriented approach of programming, while with C you can only use the function-oriented (procedural) approach. New programmers generally prefer object-oriented approach. This enforces higher modularization and reusability of classes developed and is generally recommended; while sysadmins tend to prefer function-oriented approach as that is what sysadmins are used to doing in, for example, shell scripting.

C++ is a superset containing C. So learning C++ requires you to learn C as well, so you don't lose anything. Any C libraries can also be used from within C++ programs. I write C++ myself but I also use a lot of C libraries in my programs. For example, I am not really fond of the iostream classes in standard C++ library for I/O, and I use the C stdio functions instead; but in some other cases I may prefer an object-oriented library for some other purposes, say XML processing.

Whether C++ is easier compared with C is not really a quick yes/no question. To adopt an object-oriented style you are forced to divide the functionalities of your program into various objects. An optimal division may not be always intuitive if you would like to ensure a high degree of future extensibility.

Which one to choose is your decision. However, C++ is the trend, and that's why most colleges choose C++ rather than C, because object-orientedness is an important principle in software engineering to enforce code reuse and modularization makes debugging easier.
 
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy