V
vw at iep dot tu-graz dot ac dot at
Hello
Is there something more elegant in C++ to read/write data
binary into a stream than for example:
out.write(reinterpret_cast<const char *>(&long_var), sizeof(long_var));
in.read(reinterpret_cast<char *>(&unsigned_var), sizeof(unsigned_var));
The need for reinterpret_cast<> looks suspicious.
Thanks
Volker
Is there something more elegant in C++ to read/write data
binary into a stream than for example:
out.write(reinterpret_cast<const char *>(&long_var), sizeof(long_var));
in.read(reinterpret_cast<char *>(&unsigned_var), sizeof(unsigned_var));
The need for reinterpret_cast<> looks suspicious.
Thanks
Volker