Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <vector>
- int main() {
- std::FILE* file;
- errno_t error = _wfopen_s(&file, L"/User/account/Desktop/file.data", L"r");
- const std::size_t n = 16384;
- std::vector<unsigned char> v(n);
- const std::size_t nb_bytes_read = std::fread(v.data(), sizeof(unsigned char), n, file);
- // At this point error = 0 and nb_bytes_read = 3473
- }
Add Comment
Please, Sign In to add comment