I've been struggling to figure out what I'm sure is a simple problem. Say for example I'm creating a file that lists a description of a person, i.e. age, gender, weight.
int age = 40;
char gender = male;
int weight = 175;
and if i were to put that into a file called Barney.txt, the file would display this:
40
male
175
now i understand the basics of reading a file, but say i open the file and only want to read the gender (in this case 'male'). How do i go through reading a file only selecting certain chunks? All of the tutorials I have read only tend to confuse me more. Any help would be appreciated thanks.