When I used the fscanf function in the while loop i get the error; "use of undeclared identifier "word". Heres my while loop:
while(fscanf(fpt, "%s", word)!= EOF)
So first I declared my "word" variable as
in the row above and got no error. But i'm not quite sure if that would be the correct way to do it, using the data type char? Because the fscanf function looks for a string "%s" and stores that string in a placeholder "word". Would it be more correct to use
string word = NULL;?
Tried to just use "string word;" but got an error telling me to initialize the word variable to NULL. So I did, and now I got no errors, but I'm not 100 % sure if it is correct?
Any help would be highly appreciated!