I'm currently having problems reading a line of data from a file. My code is as follows :
// File "systime.dat" contain the latest system time in for form time_t x = time(NULL);
// File "primary.dat" contains the same, except done a few minutes before.
if(!fin) cout << "LOAD ERROR" << endl;
else cout << "LOADED FINE" << endl;
fin >> y;
if(!fin) cout << "LOAD ERROR 2" << endl;
else cout << "LOADED FINE 2" << endl;
fin >> r;
cout << "Y = " << y << ", R = " << r;
This is my debugging function, and tells me where my problem is. My output is this :
I should get :
Y = 1109850952, R = 0
I'm using the same method to access these, both r and y are time_t values... I simply don't see what's wrong. Can anybody see what's wrong ?
Y= 1109850952, R = 1109850743