The code in Thinking in C++ by Bruce Eckel. Contains the sample programs in each chapter and the problems.