/ Published in: C++
Expand |
Embed | Plain Text
int m; ifstream results("numbers.dat"); results.read(reinterpret_cast < char * > (&m), sizeof(m)); //note the fact that we recast the integer 'm' to a 'char' before reading in the value /* read() returns a reference to ifstream so you retrieve multiple values as follows: results.read(&c, sizeof(c)).read(&d, sizeof(d)); */
You need to login to post a comment.
