List of CPP files
張智星
Basic differences from C
iostream00.cpp
iostream01.cpp
iostream02.cpp
localVarDeclare.cpp
defineCplusplus.cpp
defaultArgument.cpp
functionInLine.cpp
staticCast01.cpp
functionOverloading.cpp
functionTemplate.cpp
stlString00.cpp
reference.cpp
swap.cpp
exceptionHandling00.cpp
exceptionHandling01.cpp
Erros in pointers and arrays
memoryLeak00.cpp
memoryLeak01.cpp
memoryLeak02.cpp
outOfBoundIndexing.cpp
Class and constructors
constructor00.cpp
constructor01.cpp
constructor02.cpp
operatorOverloading.cpp
shallowCopy00.cpp
: Demo of shallow copy
deepCopy00.cpp
: Use new copy constructor to avoid shallow copy
deepCopy01.cpp
: Use new assignment operator to avoid shallow copy
deepCopy02.cpp
: Use both to avoid shallow copy
An example of selection sort
selsort00.cpp
: Pass by value for swap(), which does not work at all
selsort01.cpp
: Pass by address for swap()
selsort02.cpp
: Pass by reference for swap()
selsort03.cpp
: Selection sort for vector of records (structures)
selsort04.cpp
: Function for record comparison
selsort05.cpp
: Method for record comparison
selsort06.cpp
: Operator overloading for record comparison
selsort07.cpp
: Function template for selection sort, for both structure and integer vectors
Examples of STL vectors
vec00.cpp
: Show basic use of STL vectors
capacity00.cpp
: Show how STL vectors perform memory allocation implicitly
capacity01.cpp
: Show how STL vectors perform memory allocation implicitly
max_size00.cpp
: Show the use size(), capacity(), and max_size()
vecPrint00.cpp
: Print STL vectors using ostream_iterator
vecUnique00.cpp
: Show the use of sort(), unique(), and erase()
vecReplace00.cpp
: Show the use of replace(), copy()
Examples of STL maps
Examples of tries
Example of Chapter 3
gameScore00.cpp
: Storing game entries in an array
ticTacToe00.cpp
: Game of Tic-Tac-Toe