CPSC 453 Introduction to C++
Short Description
This document is an introduction to C++ for students who are experienced … The best free C++ textbook is Thinking in C++ by Bruce Eckel. You can …
Website: pages.cpsc.ucalgary.ca | Filesize: 68kb
Content
CPSC 453 Introduction to C++
Kelly Poon
September 23, 2003
This document is an introduction to C++ for students who are experienced
programming in an object-oriented language but have limited experience programming
in C++.
The best free C++ textbook is Thinking in C++ by Bruce Eckel. You can
get a copy in HTML or PDF format on his website at www.bruceeckel.com.
1 The Compilation Process
1.1 Preprocessor
The first step in compilation of a C++ program is the preprocessor. It replaces
parts of the source code with programmer-defined replacements. For example,
if the file hello.h has the following contents:
// h e l l o . h
int count ;
and the file hello.cpp has the following contents:
// h e l l o . cpp
#include ” h e l l o . h”
#define FIVE 2 + 3
void main ( ) { count = FIVE;
}
when the precompiler runs on hello.cpp it would make an intermediate file:
int count ;
void main ( ) { count = 2 + 3;
}
It replaces the “]include hello.h” with the contents of the included file. It…
Get the file Download here
Related Books:Related Searches: object oriented language, kelly poon, introduction to c, thinking in c, experience programming
Comments
Leave a Reply