How not to program in C++ : 111 broken programs and 3 working ones, or why does 2+2 = 5986? - Oualline, Steve (No Starch Press, 2003)
Based on real-world errors, the 101 fun and challenging C++ puzzles in How Not to Program in C++ range from easy (one wrong character) to mind twisting (errors with multiple threads). Match your wits against the author's and polish your language skills as you try to fix broken programs. Clues help along the way, and answers are provided at the back of the book.