Working with C++ objects