CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    Assertion Failure in fscanf

    I'm trying to read an input file into my program so I can manipulate the data and display it in the output. When I run my program, I get an assertion failure message that reads "Expression: Stream !=NULL". The error occurs after attempting to read the fscanf command that is storing the data in a user defined data structure array. What does this mean? Any advice on how to debug or correct?


  2. #2
    Guest

    Re: Assertion Failure in fscanf

    What it means is that the 1st argument (the FILE* for the file you are trying to read) is NULL. Perhaps your fopen failed? I suggest you step through the code that handles the file. Check that fopen returns a non-NULL value, and check that nothing resets the variable that holds the FILE* returned by fopen.


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