I'm writing this very simple code here and it should work just fine.. But i get like 50 errors in stat.h?
such as:
d:\mingw\include\sys\stat.h|180|error: '_off_t' does not name a type|
d:\mingw\include\sys\stat.h|180|error: 'time_t' does not name a type|
d:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar|146|error: '::fwide' has not been declared|
I made a few corrections for you. time needed a parameter, there were some semicolons missing and the else statement was inside the if statement instead of after it.