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?
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.