If you try running this code the output is exactly what I am looking for.
The problem arises when I try to change the spaces between 2 words in the .txt file. i.e.
/*
John 83 52.2
swimming Jefferson
Jane 26 10.09
sprinting San Marin
*/
What must be done to read this changed file and produce the same output? The idea is that the spaces between words can change randomly...
Well, if you can use strings, it would be easier to use some of their member functions like .find() etc...otherwise you will have either loop through the char arrays and find the extra spaces, then delete them, or just something like the token function (strtok()?) to split them (although it CHANGES your string so make a copy first if you want one).