Week 2

Home Windows C++ 241 C++ 242 Contact Info Contents

Week 2 - January 15

Back Up Next

Due Today

Chapter 6
Program #1

Preparation for Class

Continue to review your knowledge of C either in your prior course text or in ours. In particular, concentrate on the features in chapters 2 to 5. Review the chapter summaries to see what is or is not familiar and spend more time on what is less familiar to you.Watch for differences between C and C++ as you read - some of them are subtle.
Although Chapter 6 was assigned, I don't plan to get to it today. Too many people are having too many problems with the material I had considered review - and I didn't really spend any time on it last week.

Topics Covered in this Class

Review of the C Language (carried over from last week)
Program Structure
Functions
Global variables
Main() function
Declarations and definitions
Storage Classes
auto
register
static
extern
Scope of variables
Basic Data Types
Numeric Types
Characters
bool
const
Expressions
Operators
 
Conversions
Arithmetic
Assignment
Casts
Statements
Expression statement
Block Statement
Assignments
Transfer of Control
if... then...else
switch
goto
Loops
while
do ... while
for
break
continue
Arrays and Pointers
Declaration of Arrays
Use of Arrays
Arrays of Arrays
Declaration  of Pointers
Use of Pointers
Pointer arithmetic
Array - Pointer equivalence
Arrays of Pointers
Constructed types
Structures
Bitfields
Unions
Enumerations
Functions
Declaring Functions
Calling Functions
Passing and Using Arguments
Using return
Scope of variables
Recursion
Program Structure
Global variables
Main() function
Declarations and definitions
Storage Classes
auto
register
static
extern
Header Files
Multi-file Projects
Standard Libary
Input/Output
String Functions
Math Functions
Preprocessor
#include
#ifdef
#ifndef
#if
Review of Program #1
Programming Paradigms
C++ Differences from C
More Keywords (D&D p. 60)
New Comment Format (D&D p. 17)
Declarations
Where you need them (D&D p. 23)
In a for statement initializer (D&D p. 88)
New bool type (D&D p. 1028)
Namespaces (D&D p.34 & 1035)
Use of const variables in constant expressions (D&D p.  231)
References variables (D&D p. 184)
Can't assign void * to another type pointer
Defined struct, union and enum are real types
New-style casts
static_cast (D&D p. 1030)
const_cast (D&D p. 1032)
reinterpret_cast (D&D p.1033)
Functions (D&D Chapter 4)
Prototypes are required
Return of int no longer assumed
Empty arg list means no arguments
References as parameters
Use of default parameters
Use of inline
Overloading of functions and operators
Function templates
I/O operators (D&D p. 18-26 and chapter 11)
Storage allocation and deallocation (D&D p. 440)
Use new to allocate memory
Use delete or delete[] to deallocate it

Assignments

Chapter 7
Program #2

Back Up Next

Home Windows C++ 241 C++ 242 Contact Info Contents

Copyright © 2000  Charlie Poole. All rights reserved.
Revised: July 15, 2002 - cpoole@ctc.edu