Furthermore, there are many additional features in C++ that address major issues with C. Whenever possible, such features should be used (instead of the problematic C equivalent features).
Does this mean that C++ is better than C? Well, this is a somewhat ``religious'' question. Some programmers argue that C is much more efficient, flexible and it does not hide details. One can use this argument in favor of assembly language. Proponents of C++ argue that C++ is better at organizing data types, and it also has language features that help to prevent common problems in C programming.
On the pragmatic side, C++ is a much more complicated language than
C (especially the original K&R C). As a result, C compilers are more
common for architectures that are not supported by well known cross
compiler platforms (such as gcc
). This is particularly the case
in embedded system programming, where processors are highly specialized.
Of course, in a C++ class (such as CISP400), you really have no choice but to use C++. It is still useful, however, to keep in mind that sometimes plain C has its place.
Copyright © 2006-08-29 by Tak Auyeung