Guest User

Untitled

a guest
Jun 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. bool check_file_accessibility(char file_name[], char file_label[])
  2. {
  3. FILE* current_file = UNACCESSIBLE;
  4. while (current_file == UNACCESSIBLE)
  5. {
  6. current_file = fopen(file_name, READ_MODE);
  7. if (current_file == UNACCESSIBLE)
  8. {
  9. printf("\nDie %s \"%s\" konnte nicht geoeffnet werden. Bitte geben Sie einen neuen Dateinamen an (Abbruch mit Strg+C):\n",
  10. file_label,
  11. file_name);
  12. fgets(file_name, STRING_LIMIT, stdin);
  13. }
  14. }
  15. fclose(current_file);
  16. return true;
  17. }
Add Comment
Please, Sign In to add comment