c++ ifstream, ofstream, streampos, offset, tell,seek