Skip to content

Commit

Permalink
add ifexist.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
v3ctra authored Jul 13, 2020
1 parent 4319a12 commit abfe675
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ifexist.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

//It didn't looked so good to me in main.cpp...
//So, I decided to make another file for it.

bool DoesFileExist(const char* name) {
if (FILE* file = fopen(name, "r")) {
fclose(file);
return true;
}
else {
return false;
}
}

0 comments on commit abfe675

Please sign in to comment.