CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15

Threaded View

  1. #13
    Join Date
    Sep 2003
    Location
    England
    Posts
    129

    Re: fgets returns invalid parameter error

    Okay I have tried some more changes and the following is causing the same issue. The input file has about 90 entries and this stopped working on the 62nd:

    Code:
    while (5 == fscanf(fraw, "%lu %lu %lu %lu %lu", &D1,     &D2,   &D3,  &D4,     &D5))
    
        {
            linesWritten++;
            fprintf(ffor,"%lu, %lu, %lu, %lu, %lu, %lu\n",
                        D1,
                        D2,
                        (D1- D2),
                        (D3- D2),
                        (D4- D1),
                        (D5- D1));
        }

    This is the input file format:

    2267924448 242996103589964 242996103591341 242996103591477 242996103609081
    2267927216 242996103663243 242996103664688 242996103664798 242996103670621
    2267946020 242996104269242 242996104271350 242996104271494 242996104291682

    The last line is the one that failed, all of the lines are formatted the same as these three.
    Last edited by SteveTaylor; April 5th, 2011 at 03:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured