User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 375,229 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,251 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 355 | Replies: 7
Join Date: Oct 2006
Posts: 93
Reputation: edek is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
edek's Avatar
edek edek is offline Offline
Junior Poster in Training

ftell() fclose() and FILE* f = NULL

  #1  
May 9th, 2008
  1. FILE* f = NULL;
  2. fclose(f);
Terminates with: 'No source available for "fclose@@GLIBC_2.1() " '

  1. FILE* f = NULL;
  2. ftell(f);
Terminates with: 'No source available for "ftell()"'

Why those functions does not return error value but terminate whole program? How can I safely tell if file is opened in C and close it???

If variable of type 'FILE*' is passed to my function I need to know the state of the file and be able to close.
Any idea?
Last edited by edek : May 9th, 2008 at 8:58 am.
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 4:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC