Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. write_file_flag = WriteFile(
  2. hFile, // open file handle
  3. random_int_array, // start of data to write
  4. cnt * sizeof(int), // number of bytes to write
  5. &written_bytes, // number of bytes that were written
  6. NULL); // no overlapped structure
  7.  
  8. if(!write_file_flag){
  9. cout << "Couldn't write file." << endl;
  10. }
  11. else{
  12. cout << "Saved " << written_bytes << " out of " << cnt*sizeof(int) << " bytes." << endl;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement