I go to Rutgers, NB, and I'm taking a class that requires the use of C without teaching us much of C, so sorry if I'm a bit uneducated.
My first question is, when using fgets(), how do I get the next line? I have
while((fgets(line,MAX,file)) != NULL){
to get the first line of a text file, but how can I keep reading it, line by line?
Secondly, I have to parse the string input and pretty much ignore all non-alphabetic characters to retrieve words (a word is defined as alphabetic characters surrounded by either a NULL or non-alpha character)
weird-$con@tent.
would produce the output
word1 = weird
word2 = con
word3 = tent
and I was wondering if there were a built-in way to do this, perhaps using strtok().
Thanks for any help.