Interfaces in C++ - example