|
|
C++ tutorial: general
Who, what, why?
This tutorial is designed to accompany the course BIS4221: software engineering and
software management, and is intended to assist those students that have absolutely
no experience of computer programming. It may also be of benefit to students that have
some programming experience, but using languages other than C/C++.
What is 'C/C++'?
'C' and 'C++' are both computer programming languages in widespread use. In simple
terms, C++ is an extension to C. However, as this course will not make that much use
of the extended features of C++, I refer to it as a 'C/C++' course, to indicate that
it is based on standard C, with elements of C++. This course uses C++ elements when
they are simpler or more logical than corresponding C features. For example, the
C++ 'cout' and 'cin' mechanisms for doing simple screen output and keyboard input are
more logical that the equivalent C 'printf' and 'scanf' functions. They are
also less likely to fail because of trivial errors in the program.
Typographic conventions
There are a number of C++ programs used in this tutorial. You can download these
and try them with your favourite C++ compiler. When C++ programs are displayed in
these pages I have colour-coded them for ease of reading. The colours mean nothing
to the computer, and are for the benefit of the reader.
|