Simple examples in C++