Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

ofstream::write writes zeros for part of the file

https://stackoverflow.com/q/71615456/1387438

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Boost 1.78.0
C++2b(GNU)
no pedantic

ofstream::write writes zeros for part of the file

https://stackoverflow.com/q/71615456/1387438

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.78.0-gcc-11.1.0/include -std=gnu++2b
Write vector with size: 100
Read vector with size: 100
DONE
Exit Code:
0