Classes
Class 1
belly — Sat, 2011-03-05 09:03
In and effort for people to better understand programming, a variety of classes content will be created to provide some adhoc “teachings” of programming that may assist some people that are interested in this area.
Therefore, these "Classes" and "Exercises" have been developed to help understand some of the basics of programming and will be based upon on the programming language C++. “In my opinion, if you can program C++, you can program and understand C”!
Those who are unaware – most of Linux is actually built upon C / C++....
Anyway, as per the gcc man page, I thought I would include the following information:
Compiling C++ Programs
C++ source files conventionally use one of the suffixes .C, .cc, .cpp,
.CPP, .c++, .cp, or .cxx; C++ header files often use .hh, .hpp, .H, or
(for shared template code) .tcc; and preprocessed C++ files use the
suffix .ii. GCC recognizes files with these names and compiles them as
C++ programs even if you call the compiler the same way as for
compiling C programs (usually with the name gcc).
However, the use of gcc does not add the C++ library. g++ is a program
that calls GCC and treats .c, .h and .i files as C++ source files
instead of C source files unless -x is used, and automatically
specifies linking against the C++ library. This program is also useful
when precompiling a C header file with a .h extension for use in C++
compilations. On many systems, g++ is also installed with the name
c++.
When you compile C++ programs, you may specify many of the same
command-line options that you use for compiling programs in any
language; or command-line options meaningful for C and related
languages; or options that are meaningful only for C++ programs.
Those who are interesting in learning about the history of C++, you might like to check out the following Wikipedia page http://en.wikipedia.org/wiki/C%2B%2B.
Additionally, you might enjoy the following quote from Bjarne Stroustrup (original developer of the C++ programming language):
"In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg." — Bjarne Stroustrup.
