Guest User

Untitled

a guest
Jan 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <cstdio>
  2. #include <vector>
  3.  
  4. int main() {
  5. std::FILE* file;
  6. errno_t error = _wfopen_s(&file, L"/User/account/Desktop/file.data", L"r");
  7.  
  8. const std::size_t n = 16384;
  9. std::vector<unsigned char> v(n);
  10. const std::size_t nb_bytes_read = std::fread(v.data(), sizeof(unsigned char), n, file);
  11.  
  12. // At this point error = 0 and nb_bytes_read = 3473
  13. }
Add Comment
Please, Sign In to add comment