write in C++