Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool check_file_accessibility(char file_name[], char file_label[])
- {
- FILE* current_file = UNACCESSIBLE;
- while (current_file == UNACCESSIBLE)
- {
- current_file = fopen(file_name, READ_MODE);
- if (current_file == UNACCESSIBLE)
- {
- printf("\nDie %s \"%s\" konnte nicht geoeffnet werden. Bitte geben Sie einen neuen Dateinamen an (Abbruch mit Strg+C):\n",
- file_label,
- file_name);
- fgets(file_name, STRING_LIMIT, stdin);
- }
- }
- fclose(current_file);
- return true;
- }
Add Comment
Please, Sign In to add comment