fstream file; file.open('text.txt', std:ios::out | std:ios:ate | std::ios::binary); file<<"1234567890"; file.seekg(-1, std:ios::end); file<<"A";