View Single Post
Join Date: Sep 2004
Posts: 7,823
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: 748
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Senior Bitch

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. }
New members chased away this month: 3
Reply With Quote