Front matter

Outline

Introductions

Daily Schedule

Day 1 - Morning - Part 1 - Preparing for C++

Introduction to C++

Compiler versions vs. C++ versions

Why is C++ popular

Disadvantages of C++

Characteristics of C++

hello.c

hello.c explanation

reserved names in C

Preparing for C++

hello2.cpp

Creating a C++ program

hello3.cpp

hello2.cpp and hello3.cpp explanation

Editing within the Borland C++ 4.0 for Windows system

Use of Borland C++ 4.0 for Windows integrated development environment

Borland C++ for Windows main menu screen

Borland C++ 4.0 for Windows main menu

Borland C++ 4.0 for Windows system keystroke mapping (default)

Borland C++ 4.0 for Windows editor commands (control characters - default mapping)

Borland C++ 4.0 for Windows editor commands (special, function and arrow keys - default mapping)

Borland C++ 4.0 for Windows editor commands (special key combinations - default mapping)

Compiling, linking, and running programs in Borland C++ 4.0 for Windows

Compiling and running a C++ program

Learning the development environment

Lab 1 - run hello.c; run hello2.cpp; edit and re-run hello2.cpp; locate and run hello3.cpp and hello4.cpp

cast.c

Casts

cast2.cpp

Preparing casts for C++

hello4.cpp and hello5.cpp

hello4.cpp and hello5.cpp explanation

fc4.c and fc5.cpp

fc4.c and fc5.cpp explanation

array4.cpp

Constants and variables

Fundamental data types

Variable names

Lab 2 - re-writing fc4.c to run under C++; generate a table; average an array

(old remainder of outline follows:)

Outline of preparing for C++

Comparison of C to C++

Preparing variables, comments for C++

Type compatibilities -int vs. char -float vs. double

Differences in use of void -before - parameter list

Prototyping C functions (ANSI) -functions must be declared or defined before they are called

Preparing functions for C++ -prototype -void -parameterless functions

Defining functions with a variable number of arguments

Preparing I/O for C++ -2 different I/O streams -cout -< (insertion operator) -eol function -no scanf -iostream.h -fflush

Preparing stronger typing (removing #define's) for C++ -using const

Preparing structures for C++ and avoiding name conflicts

Preparing unions for C++, anonymous unions )also, name space

enums and preparing them for C++, anonymous enums -can’t use integers

The :: scope operator and preparing scopes for C++

Definitions in the middle of code

Day 1 - Afternoon - Part 2 - Features of C++

powr1.c

powr1.c explanation

powr4.c

powr4.c explanation

powr5.c

powr5.c explanation

Error checking in Borland C++ 4.0 for Windows

Program error checking

Borland C++ 4.0 for Windows error options

Borland C++ 4.0 for Windows error options (continued)

maxline.cpp

copy.cpp

getline.cpp

Compiling separate files in Borland C++

Separate compilation

Lab 1 for Part 2 - rewrite table generation as functions; inventory

Precedence chart of C operators

Precedence chart of C++ operators

swap1.c

Pointers

swap2.cpp

Pointers/references

refern.cpp

Using references to obtain lvalues

addup1.cpp

Default parameters

typedef.c

C typedef review

C structures review

C structures and typedef review

C access to structure components review

struct1.c

struct2.c

sizex1.cpp

sizex1.cpp (continued)

Overloading functions

opadd1.cpp

Operator overloading

opadd1.cpp (continued)

Lab 2 - triangle and rectangle perimeter, area, overload + and * (merge 2 shape programs)

traingle.c

(remaining topics from original outline follow:)

Preparing pointers for C++ -type casting -pointer to void

Video Tape

String literal concatenation

Declarations ARE statements

void pointers

type equivalence (not the C notion of structural equivalent)

Day 2 - Morning - Part 3 - Classes and Objects

Characteristics of C++

Object orientation

Class (diagram)

Object-oriented programming

Classes

triangl2.cpp

Classes

triangle2.cpp (Cont.)

triangle2.cpp explanation

triangl3.cpp

Constructors

triangl3.cpp (Cont.)

triangl3.cpp explanation

string4.cpp

Destructors

string4.cpp (cont.)

string4.cpp explanation

string5.h

string5.h (cont.)

string5.cpp

Copy constructor

Lab 1 for part 3 - trace string4.cpp; complex numbers; employee class; code cleanup

struct employee

(items below are from old outline:)

video tape - world of objects

placing class info in a header file

preparing dynamic storage allocation for C++ -new and delete

changing memory handlers on the fly

this pointer

conversions

initialization of static, const, and external objects

new type definition by class (different from typedef)

Day 2 - Afternoon - Part 4 - Interaction Between Classes

condit1.c and condit2.c

C conditional expression operator review

condit3.c, Results of condit1.c, condit2.c, and condit3.c

Side effects in parameters

condit4.cpp

condit5.cpp and condit5.h

condit6.h and condit7.h

Inline functions

enum.cpp

Enumerations

enumout.cpp

Overloading the < operator

enumout2.cpp

Friends

enumout3.cpp

Supporting < without friends

scope.cpp

Variable scope

union2.c

Unions for variant records

union2.c (cont.)

Derived classes

union3.h

union3.h (cont.)

union3.cpp

Implementing derived classes

shape.h

Polymorphism

shape.cpp

Avoiding programming pitfalls

shapedrv.cpp

Lab 1 for part 4 - overload < to replace print(); convert short functions to inline

(additional topics from earlier outlines:)

inheritance

name mangling

external declarations require extern

user-specified type conversions

Day 3 - Morning - Part 5 - Input and Output

Stream input

Input stream manipulation

Stream output

Stream status

testout.cpp

Stream format control

testout2.cpp

Stream format states

Format flags

File I/O

Opening files

Closing a file

Mixing C style and C++ style I/O

fileio2.cpp

reverse3.cpp

Lab 1 for Part 5 - format experimenting; file size; file compare

(remaining items from older outlines:)

sets

streams

strings

Day 3 - Afternoon - Part 6 - Advanced Features and Class Libraries

Advanced features

template.cpp

templates

Trivial conversions

Argument matching rules

hello6.cpp

Exception handling

hello6.cpp (cont.)

Multiple inheritance

house.h (page 1 of 4)

house.h (page 2 of 4)

house.h (page 3 of 4)

house.h (page 4 of 4)

house.cpp

Class libraries

BIDS

Lab 1 for Part 6 - string function and library hiding; character function and library hiding

(additional topics from earlier outlines:)

constant objects and constant member functions

type-safe linkage

template mechanism -template function -template classes

address of a register variable