Basically I'm reading a line from a file and putting the contents into a structure, my problem is that the file keeps reading the whole line together and ignoring the spaces, which I need to determine where each word is separated.
Why do you use a function designed to read entire lines and then complain that it does its job correctly? If you don't want that behavior, don't ask it to read the entire line.