C Cpp File Operations
C File Operation
VS do not allow “fopen” function to pass compilation.
FILE* fp
//using MS Visual Studio(2019)
if ((fopen_s(&fp, "<path>", "<mode>"))){
printf("Cannot open the file.\n");
exit(<error code>);
}
//using other compiler
if((fp=fopen("<path>", "mode")) == NULL ){
printf("Fail to open the file.\n");
exit(<error code>);
}