Why do I have do use the Seekg()-function two times in a row to make it work?
Code:
fbin.seekg(0); //jump to record at start of file
fbin.seekg(0); //jump to record a second time (else it won't work)
fbin.read(name, sizeof(name)); //read from data field 1
fbin.read(reinterpret_cast<char*>(&age), sizeof(int)); //read from data field 2
cout << "Name: " << name << endl;
cout << "Age: " << age;