C++ to txt file update