Home
Random
Nearby
Log in
Settings
Donate Now
If Wikipedia is useful to you, please give today.
About Wikipedia
Disclaimers
Search
Error code: Difference between revisions
Article
Talk
Language
Watch
View history
Edit
Browse history interactively
← Previous edit
Next edit →
Content deleted
Content added
Visual
Wikitext
Revision as of 05:30, 23 April 2008
edit
Jkl
(
talk
|
contribs
)
Extended confirmed users
2,273
edits
No edit summary
← Previous edit
Revision as of 08:52, 20 May 2008
edit
undo
87.183.129.166
(
talk
)
→
Examples
:
minor cleanup
Next edit →
Line 5:
<source lang="c">
/* attempt to open file for reading */
FILE *fp = fopen("filename", "r");
/* if file cannot be opened, print error number and error string */
if (fp == NULL){
printf("Cannot open file, error %d, %s\n", errno, strerror(errno));
/* Alternatively one can use perror() to provide the above functionality */
perror("Cannot open file");
}
</source>