12345678
#include <iterator> #include <algorithm> char buffer[1470]; std::ofstream file("yourfile.txt"); std::ostream_iterator<char> ostr_it(file); std::copy(buffer+2, buffer+1469, ostr_it);