C++ writer