C++ Review: List of Concepts Covered (since midterm)


Input / Output Libraries

File I/O

Other I/O Stream Features

Misc -- cctype library



Arrays

Array Properties

Declaring Arrays

Initializing Arrays

Using Arrays

Using c-strings

Arrays as function parameters

Array Usage and Algorithms

<cstring> library functions:

string objects


Pointers

Basics

Initializing pointers

If p is a pointer, then how can we fill in the blank?
 p = _____
Four ways:
  1. NULL pointer
  2. Another pointer of the same type
  3. The "address of" an existing variable
  4. a new operation (Dynamic Allocation -- See below)

Pointer Arithmetic:

Pointers and Arrays:

Pass by Address:


Dynamic Memory Allocation

Memory Allocation Categories

Dynamic Allocation, Deallocation

Dynamically resizing an array (application example):

  1. dynamically create a new array of the needed size (need another pointer for this)
  2. copy the data from the old array to the new one (use a for-loop)
  3. delete the old dynamic array (keyword delete)
  4. change the pointer so that the new array has the original name

Structures

Using structures

Enumerations


Arrays: Searching and Sorting

Searching

Sorting



C vs. C++

Formatted Output with printf

Formatted Input with scanf

Other C / C++ differences

Understand the other language differences discussed in class, including: