Read From File in Visual Studio 2010, Where Do I Put the File?

Title says it all, really. I'm working on a simple project for a class to read in data from a text file, but the code can't ever seem to find the file. Does anyone know what folder Visual Studio 2010 looks in by default?
Last edited on
tylara67 wrote:
but the code can't ever seem to find the file. Does anyone know what folder Visual Studio 2010 looks in by default?


Not sure I'm following you, post your code where you are trying to read in data from a text file. It has nothing to do with VS 2010 default settings. Also where is your file stored at? To make things easier just drop it into your project folder where you .cpp files are.
Last edited on
OK, I found it. I was putting the file I wanted to load in the folder with the generated .exe file. I didn't know it needed to be in the folder with the .cpp files. It works now, thanks!
I figured that was the case. It doesn't need to be in the folder with the .cpps, it just allows you to avoid entering a path to the file. In the real world files are all over the place.
Topic archived. No new replies allowed.