I got a great deal of fun and benefit from an old copy of Dietel's "C: How to program" (seems that recent editions have C++ in it too now, so it may have changed a lot).
Takes you through writing an interpreter and then a compiler for a toy basic-like language.