If i have a text file say:
"dog cat mouse elephant"
and i want to read those into an char array the reader always just reads dog and then moves to a new line.
I don't know how many 'animals' will be in the text file so i can't just
read (7,*) animal(1), animal(2) etc, but i do know there isn't more than 50 so i can just allocate the char array.
Will i have to read them all in the check for spaces and seperate them then or is there some way to stay on the file line until an actual endline is found?
Thanks
"dog cat mouse elephant"
and i want to read those into an char array the reader always just reads dog and then moves to a new line.
I don't know how many 'animals' will be in the text file so i can't just
read (7,*) animal(1), animal(2) etc, but i do know there isn't more than 50 so i can just allocate the char array.
Will i have to read them all in the check for spaces and seperate them then or is there some way to stay on the file line until an actual endline is found?
Thanks