G
geese786
int fp
fp = fopen ( "r , "abc.txt);;
it is giving error "file not opening"
fp = fopen ( "r , "abc.txt);;
it is giving error "file not opening"
int fp
fp = fopen ( "r , "abc.txt);;
it is giving error "file not opening"
int fp
fp = fopen ( "r , "abc.txt);;
it is giving error "file not opening"
int fp
fp = fopen ( "r , "abc.txt);;
it is giving error "file not opening"
Ignoring the obvious syntax errors, the problem is that you have your
parameters reversed. It *should* be
fp = fopen("abc.txt", "r");
What reference manual are you using?
Chris said:I find this highly surprising, since the code isn't remotely
compilable.
If one hallucinates that fp is a FILE*, and that the code
appears within, say, main, and that the fopen call repairs
to
fp = fopen( "r", "abc.txt" );
to get that problem report, then I'd expect it to be because
there's no file called `r` to open.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.