I'm having trouble opening a file for reading, but only when it is inside a folder. I'm using Visual Studio 2010, and placing the folders with the files inside the "Debug" folder with the .exe, and running it just by clicking the .exe (not from within VS). The code that is failing to work is:
FILE* FileHandle = fopen("./maps/1.area", "r");
if(FileHandle == NULL) {
return false;
}
FileHandle is always coming up as NULL. The code works fine if I move 1.area to the same folder as the exe, but if I move it down a level, it doesn't work. This same filepath style works when I use an SDL method to open a bitmap, so I can't figure out why it's failing with fopen.