This page provides links to source code for each text (where available) and also presents programs which correct errors or which extend examples given in his books.

Source Code for Books

C# by Dissection

Java by Dissection

C++ for C Programmers, Second Edition

C++ for C Programmers, Third Edition

C++ for Pascal Programmers, Second Edition

C++ for Fortran Programmers

Object-Oriented Programming Using C++, Second Edition

C++ Distilled: A Concise ANSI/ISO Reference and Style Guide

A Book on C, Fourth Edition

C by Dissection, Fourth Edition


Dynamic Cast Code Example

This is a supplemental example showing the use of dynamic_cast.

Clock Class Code Example

This code improves on the existing clock example. That example used different techniques such as member function overloading versus friend function overloading for didactic purposes. This version is more uniform.

Multiple Inheritance Example

This is an example of multiple inheritance mixin showing implementation and interface.

Mutable members

In C++ for C Programmers, C++ Distilled and Object-Oriented Programming Using C++, the mutable example uses a non-const member function incorrectly as was pointed out by Paul Ezust (see for example C++ for C Programmers, Third Edition p156.) The indicated change corrects the problem. The code in this example is a small variation on the book that incorporates the correction.

String Constructors Example

This is an example of all six STL String constructors.

Lvalue and Rvalue Example

This file includes a further explanation of lvalues and rvalues as well as a code example which demonstrates those differences.