Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. int main(int argc, char* argv[])
  5. {
  6. const char* filename = "c:\_Test\hard.dat";
  7.  
  8. std::ofstream ofs(filename, std::ios::binary | std::ios::out);
  9. if (ofs.bad())
  10. {
  11. std::cerr << "fail to open filen";
  12. return -1;
  13. }
  14.  
  15. for (unsigned int i = 0; i < 0x10000; ++i)
  16. {
  17. unsigned int t = (i * 0xc369) & 0xFFFF;
  18. ofs.write((char*)&t, 2);
  19. }
  20. std::cout << "job donen";
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement