Reading from a file input
-
Hey guys, I am suppose to read in from a text file. M is the sex and 24 is the age. The file I'm currently reading has the following code. I am wondering what the ws is for. I see how fin >> sex is reading in the sex of the person and fin >> swimmer[actualSwimmers].age is reading in the age. What is the >> ws doing there??? Someone please help me out here thanks in advance. M 24 fin >> sex; fin >> swimmers[actualSwimmers].age >> ws;
-
Hey guys, I am suppose to read in from a text file. M is the sex and 24 is the age. The file I'm currently reading has the following code. I am wondering what the ws is for. I see how fin >> sex is reading in the sex of the person and fin >> swimmer[actualSwimmers].age is reading in the age. What is the >> ws doing there??? Someone please help me out here thanks in advance. M 24 fin >> sex; fin >> swimmers[actualSwimmers].age >> ws;
This is explictly skipping white space. I'm not sure of you need this in your code or not.
Steve