View Single Post
Join Date: Sep 2004
Posts: 7,540
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Assertion Failure???

 
0
  #3
Dec 10th, 2008
>Expression: stream != NULL
Yet more proof (as if we needed any) that checking for success is a good thing. perror is your friend, my friend:
  1. fp = fopen ( filename, "r" );
  2.  
  3. if ( fp == NULL ) {
  4. perror ( "Error opening file" );
  5. exit ( EXIT_FAILURE );
  6. }
I'm here to prove you wrong.
Reply With Quote