I am using Microsoft Visual Studio 2010 on Windows 7. I am making a console app and I am trying to open a text file, "sample.txt", from the project folder. When I type infile.open("sample.txt"); it is not working. I have to specify the entire path. Whenever I used Code::Blocks and dev-C++ before that, the compiler automatically checked the project folder. Does that not work in VS?