Don’t forget to define true and false constants.
#define TRUE 1 #define FALSE 0 |
int file_exists(const char *filename) { FILE *file = fopen(filename, "r"); if (file) { fclose(file); return TRUE; } return FALSE; } |
Don’t forget to define true and false constants.
#define TRUE 1 #define FALSE 0 |
int file_exists(const char *filename) { FILE *file = fopen(filename, "r"); if (file) { fclose(file); return TRUE; } return FALSE; } |