• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
C++ Annotations Version 6.5.0
Frank B. BrokkenComputing Center, University of GroningenNettelbosje 1,P.O. Box 11044,9700 CA GroningenThe NetherlandsPublished at the University of GroningenISBN 90 367 0470 71994 - November 2006
 
 Abstract
This documentis intended for knowledgeable users of 
C
(or any other language using a
C
-like gram-mar, like
Perl
or
Java
) who would like to know more about, or make the transition to,
C++
. Thisdocument is the main textbook for Frank’s
C++
programming courses, which are yearly organizedat the University of Groningen. The
C++
Annotations do not cover all aspects of 
C++
, though. Inparticular,
C++
’s basic grammar, which is, for all practical purposes, equal to
C
’s grammar, is notcovered. For this part of the
C++
language, the reader should consult other texts, like a book cover-ing the
C
programming language.If you want a
hard-copy version of the C++ Annotations
: printable versions are available inpostscript, pdf and other formats in
ftp://ftp.rug.nl/contrib/frank/documents/annotations
,in files having names starting with
cplusplus
(A4 paper size). Files having names starting with‘cplusplusus’ are intended for the US
legal
paper size.The latest version of the
C++
Annotations in html-format can be browsed at:
http://www.icce.rug.nl/documents/
 
Contents
2.1 What’s new in the C++ Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2 C++’s history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2.1 History of the C++ Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2.2 Compiling a C program using a C++ compiler. . . . . . . . . . . . . . . . . . . 222.2.3 Compiling a C++ program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.3 C++: advantages and claims. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.4 What is Object-Oriented Programming?. . . . . . . . . . . . . . . . . . . . . . . . . . . 252.5 Differences between C and C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.5.1 Namespaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.5.2 End-of-line comment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.5.3 NULL-pointers vs. 0-pointers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.5.4 Strict type checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.5.5 A new syntax for casts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.5.6 The ‘void’ parameter list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.5.7 The ‘#define __cplusplus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.5.8 Using standard C functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.5.9 Header files for both C and C++. . . . . . . . . . . . . . . . . . . . . . . . . . . 312.5.10 Defining local variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.5.11 Function Overloading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.5.12 Default function arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.5.13 The keyword ‘typedef’. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.5.14 Functions as part of a struct. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...