I already explained to you earlier how to find a "blank line" earlier in this thread. But I'll try again..
rc1 = fgets ( fbuff, 400, game_file_ptr );
if (rc1==NULL) {
printf("\n bad...
Type: Posts; User: nonpuz
I already explained to you earlier how to find a "blank line" earlier in this thread. But I'll try again..
rc1 = fgets ( fbuff, 400, game_file_ptr );
if (rc1==NULL) {
printf("\n bad...
Okay...now that I actually look at the code you post, there are some serious memory issues here:
/* OOPS! we're reading from and writing to the same variable: var1...
Your fscanf call is simply trying to pull a full line...instead use fgets, and a loop structure such as this:
...
while (fgets(buf, SIZEOF_BUF, fp)) {
if (ferror(fp)) {
...
Post some actual code so we can see what your intent/issue is clearly.
Side-note: you dont need to call fflush(stdout) if your printf() call has a \n (anywhere) in the output.