Software

 

Example Programs

bullet

General Useful Examples
bullet

Using C-Style Strings (c_string.cpp)

bullet

Calculating a Calendar Date (datetest.cpp)

bullet

Using printf() (formatted_print.cpp)

bullet

Conversion of int to string (tostring.cpp)

bullet

Casting types (static_cast.cpp)

 

bullet

Class Definitions (Chapter 6)
bullet

Complex Number Examples
bullet

Version1:   (complex_v1.h, complex_v1.cpp, app_v1.cpp)

bullet

Version 2:  (complex_v2.h, complex_v2.cpp, app_v2.cpp)

bullet

Version 3:  (complex_v3.h, complex_v3.cpp, app_v3.cpp)

Linked List Example:  (sll_of_pos_int_adt.h, sll_of_pos_int_adt.cpp, linked_list_adt.cpp)

Constructors, Destructors, and Assignment Overloading (Chapter 8s and 12)
bullet

Addressed in homework #4 (singly-linked lists)

Dynamic Memory and Data Structures, Linked Structures (Chapters 12 and 15))
bullet

Allocating Memory from the Dynamic Storage Pool (dynamic_storage.cpp)

bullet

An elementary singlely-linked list data structure definition (sll_of_pos_int.h) and implementation (sll_of_pos_int.cpp).

bullet

An application of the linked list (linked_list.cpp)

Pointers (Chapter 12)
bullet

Intro to Using Pointers (pointer_intro.cpp)

bullet

Shows various uses of incrementing and decrementing pointers (ptrprob.cpp)

bullet

More examples with adding pointer values (pointer_arithmetic.cpp)

bullet

Using Pointers as Function Parameters (pointer_as_param.cpp)

bullet

Using Pointers to Classes (pointer_to_class.cpp)

bullet

Using Pointers to Functions (multisort.cpp)

Inheritance and Polymorphism (Chapter 16)
bullet

Vehicle Test Program (vehicle_test.cpp)

Template Functions and Classes (Chapter 14)
bullet

A GenericList template class (myListTest.cpp, genericList.h, and genericList.cpp)

bullet

Simple template functions (mySwap.cpp, swapit.h, and swapit.cpp)

Containers and Iterators (Chapter 18)
bullet

Vectors (vectortest.cpp)

bullet

Lists (listtest.cpp)

bullet

Stacks (stacktest.cpp)

bullet

Queues (queuetest.cpp)

bullet

Priority Queues (pqueuetest.cpp)

Namespaces (Chapter 9)
bullet

Silly.cpp and silly.h export a namespace which is used in the main program (main.cpp).

Exception Handling (Chapter 17)
bullet

Examples  with file I/O and with functions throwing exceptions (except.cpp)

wxWidgets (Handouts)
bullet

Displaying BitMaps (photo.cpp)

bullet

Simple "Paint" Program (draw.cpp)