2010-09-28, 07:31 PM
GummyBear Wrote:My C++ is very rusty (no pun intended dr.rusty), but I somewhat remembered you can do something like this
char gender;
float gpa;
open file
file_handle >> gender >> gpa;
Again, I am not 100% sure, but somehow, I vaguely recall you can do something like that. Too early to Google check.
Fiel Wrote:Gummy, I think that reads binary data. So that will read the first char fine, but it won't skip the space like fscanf.
Actually I'm quite sure it does skip spaces (unless you're trying to read a char instead, in which case it will read the space as the char).

