I have written a program that attempts to open a file using std::ifstream::open(). open() fails when I run the program inside Visual Studio (even when I choose the option "start without debugging") but works fine if I run it outside Visual Studio. Why does this happen?
Here's some test code I wrote to isolate the problem, it runs fine outside Visual Studio and prints the file content to screen.
I had placed the files in the same directory as the output executable so I thought that was sufficient for VS2010 to find them.
What if I wanted to have this program work using relative paths though (and have Visual Studio be able to find the files as I work on it)? Is it a matter of specifying additional directories in the Project's properties (VC++ Directories)?