Beginner's guide to C++
Beginner's guide to C++
Introduction
C++ is a object oriented langage based upon C. In order to learn such a
"thing", I think the reader should be familiar with procedural programming, in
order to see the big differences, and also with C. The aim of this page
is not to explain C, but to gradually explain the differences between C and C++
that make C++ such a powerfull langage.
Table of contents
There will be 3 main parts in this guide. I recommend that you read them
in this order, unless you are lookink for something special. They are:
- Differences between C and C++:
Those little differences have nothing or little to do
with object oriented programming, but correct
many problems of standard C.
- Object programming: The really big part.
This includes classes, objects and
connected issues. After that, you won't be the same programmer...
- Complex additions: Templates,
streams, exceptions... Add these to become a C++ super-user.
You can browse this tutorial following the previous links, or you can
use a more linear approch with the Tutorial Browser
(Netscape 2.0 Enhanced).
Software requirement
In a technical point of view, everything you get compiled with a C compiler
should do as well with any C++ compiler. Just activate the right
options and everything will be ok: switch to C++ mode under Borland C++
(general extension is CPP for C++ files), use g++ or c++ instead of
gcc or cc on a Unix-based station, ...
C++ is used on many computers, but I personnaly work on a Pentium based PC
under Linux. I have gcc/g++ 2.7.0, quite a standard now, and each example
given will compile and hopefully work on it. I think it would be easy
to use each example on other systems. Anyway, if you've got a problem
and you think there's a bug in my code, don't hesitate,
mail me !!!
See also
I you just want to learn C (for your own pleasure, or because you think
it's better to learn C before C++), you can have a look at the
David Marshall
"Programming in C" Guide.
There are also a lot of tutorials and web pages about C++ or related to C++
on the net. Here are some...
Special thanks
PiLP:
first english reader. He corrected many mistakes.
Jean-Philippe Cottin:
for many examples.
Technical support
I hope that those C++ things are good enough to help. But anyway,
I'm sure those pages are not coverring the whole word of C++. Therefore,
I ask you to mail me any comment,
suggestion or correction.