I'm using "Visual Studio 2010" on "Windows 7 32bit", and I'm working on my "debug" build.
In my program I use fopen to access a file using this code:
FILE *f = fopen("simple_test.asm", "r");
When I run (F5) it returns a NULL pointer. When I use full path it works well.
The strange thing is, when I open the file through cmd, it works like a charm even when I don't use full path!
Can someone please shed some light on this? Thanks!
cmdshell, you might be in a different directory than visual studio uses to run your program. You should be able to set the working directory in the Project Settings: msdn.microsoft.com/en-us/library/kcw4dzyf.aspx - millimoosefopen? - Joe White