Search:

Type: Posts; User: nonpuz

Search: Search took 0.01 seconds.

  1. Replies
    55
    Views
    5,183

    I already explained to you earlier how to find a...

    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...
  2. Replies
    55
    Views
    5,183

    Okay...now that I actually look at the code you...

    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...
  3. Replies
    55
    Views
    5,183

    Your fscanf call is simply trying to pull a full...

    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)) {
    ...
  4. Replies
    55
    Views
    5,183

    Post some actual code so we can see what your...

    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.
Results 1 to 4 of 4