I have the following code :
FILE *fp = fopen( srcFile.filename.c_str(), "rt" );
srcFile happens to be the solution's main.cpp file, and thus is opened in the solution. fopen returns NULL most of the time (but not when I step into it, which is weird).
However, when I close main.cpp in Visual Studio, the code works. Even when the file is opened in Notepad++.
Any workaround ?
PS I tagged it as C but the file is compiled as c++, IDK if it changes anything.