hello
im trying to read data from a file
the file appears like
how can i read these in ?Code:1 Dog Tim Male 4 4.7 5 0 0 0 0 0 3 Cat Missy Female 3 4.0 2 1 0 0 0 0
what happens is it reads in the Dog entry fine, but when it gets to the Cat entry, it doesnt seem to be reading in the Cat ID which is 3..Code:ifstream c(file.c_str()); c.getline(id,4); c.getline(type,50); c.getline(name,50); c >> gender; c >> age; c >> weight; c >> total_visits; while( c >>points[x] ) x++;
?