Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- errno = 0;
- const char *filename = "/Users/davidfrenzel/Google Drive/Studium/Semester 1/Programmierung 1/Projects/Uebung4/...";
- FILE *file;
- file = fopen(filename, "r");
- if (file == NULL) {
- fprintf(stderr, "%s\n", strerror(errno));
- exit(1);
- } else{
- printf("The file %s was Found\n", filename);
- }
- return 0;
- }
- No such file or directory
- (You're right!)
- BUT:
- int main() {
- errno = 0;
- const char *filename = "...";
- FILE *file;
- file = fopen(filename, "r");
- if (file == NULL) {
- fprintf(stderr, "%s\n", strerror(errno));
- exit(1);
- } else{
- printf("The file %s was Found\n", filename);
- }
- return 0;
- }
- The file ... was Found
Advertisement
Add Comment
Please, Sign In to add comment