xTachyon

Untitled

Aug 1st, 2016
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. std::fstream mFile;
  2. ---
  3. mFile.open(filename, std::ios::in | std::ios::out | std::ios::binary | std::ios::app);
  4. ---
  5. mFile.seekp(0, mFile.beg);
  6. std::cout << std::to_string(mFile.tellg()) + " " + std::to_string(mFile.tellp()) + "\n";
  7. mFile.write(bin.dataAsConstChar(), bin.size());
  8. std::cout << std::to_string(mFile.tellg()) + " " + std::to_string(mFile.tellp()) + "\n";
  9.  
  10. output:
  11. 0 0
  12. 3522791 3522791
Advertisement
Add Comment
Please, Sign In to add comment