! File handling in C++ !

Jan 28, 2016 at 11:17pm
Please tell me what this line do->

while(f1.read((char*)this,sizeof(park)));

Please tell what's the use of WHILE and THIS in this statement.
Last edited on Jan 28, 2016 at 11:27pm
Jan 29, 2016 at 8:54am
this:

http://www.learncpp.com/cpp-tutorial/8-8-the-hidden-this-pointer/



The while loop will overwrite the data of whatever this points to until it reaches end of file or any other error.

It would be a big surprise if that does not lead to crash.
Topic archived. No new replies allowed.