Hi everyone,
Confession: I am a novice.
Question: I was checking out stdio.h
, but I could not find the definition of the fopen
function. Can somebody please tell where can I find the definition?
regards,
bug.
Hi everyone,
Confession: I am a novice.
Question: I was checking out stdio.h
, but I could not find the definition of the fopen
function. Can somebody please tell where can I find the definition?
regards,
bug.
If you're using unix or linux you can find it with:
man fopen
Otherwise, just google for man fopen and you'll find it.
You can use man
for pretty much any standard library function.
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) __wur;
As you said, in stdio.h
.
alternatively, you can go on http://cplusplus.com/ under reference -> C Library -> cstdio (stdio.h)
the declaration should be in stdio.h (afaik the standard requires this), but it's not likely you're going to find the definition there*. If you are using an open source os, it probably has packages containing source code (containing the definition) you can download. Else, sorry, no definition available.
*supposing the author considers definition to mean the actual implementation whereas declaration rather refers to function prototype
I found sourcecode here. am not a C-Coder so check the result for yourself. As far as I can tell, it looks like a real implementation. But even if it is not the "true" implementation it can at least give some hinds for the learning eyes. So it should be helpful, to know this file.
You can find the definitions of functions in stdio.h here: http://en.wikipedia.org/wiki/Stdio.h
And here's an article on C file io: http://en.wikipedia.org/wiki/C_file_input/output
In C editter You can see Help Menu....than Index...write down fopen..u find whole explanation for fopen.. thank you