D
Dart
ifstream ifs;
ifs.open("whatever.bin", ios::in | ios::binary);
How to set flag above so that if "whatever.bin" file missing, rather than
create a new file named "whatever.bin", but providing a way to detect the
error?
ifs.read((char *)p, 4);
Does each "read()" call above read only in bytes? Is it possible to
directly read in ints? Like ifs.read((int *)p, 1);
ifs.read((char *)p, 16);
How to obtain 4 ints out of p pointing to 16 bytes?
Thanks!
ifs.open("whatever.bin", ios::in | ios::binary);
How to set flag above so that if "whatever.bin" file missing, rather than
create a new file named "whatever.bin", but providing a way to detect the
error?
ifs.read((char *)p, 4);
Does each "read()" call above read only in bytes? Is it possible to
directly read in ints? Like ifs.read((int *)p, 1);
ifs.read((char *)p, 16);
How to obtain 4 ints out of p pointing to 16 bytes?
Thanks!