C++ implementation of Observer design pattern example from Head First Design Patterns