Simple C++ problems