Re: File exist



paytam@xxxxxxxxx wrote:
Hi all
Can anyone tell me how can I check that a file exist or no.I mean when
you use this commands
FILE *fp;
if(!fp)
//Could not open the file
doen't show why it can not open it,may be the file doesn't exist.Now
tell me what should I do!
Thanks

In addition to all other answers you got, please read the FAQ: http://c-faq.com.

I recommend reading it all, but your question in particular is question 19.11.

S.
.