My question is rather simple. While I can use strtok to, say, divide the contents of a string of months separated by spaces or commas into useful little bits, I'm a touch lost when I might be reading something from a file where said months are separated by the ends of lines instead of spaces or commas. What might be an easy way to do this?
I'm using fopen and then fgets to write into a string at the moment.
tl;dr:
strtok(string, "\n") does not work, what might I do?
Oh, hey, wow, that's a lot of answers rather quickly, thanks guys. I rather like both using >> and the stream examples, though I've yet to get around to testing them.