Link to home
Start Free TrialLog in
Avatar of NSing9
NSing9Flag for United States of America

asked on

Where must the text file (.txt) be placed in a C++ project when reading input for this file isntead of from the console?

Where must the text file (.txt) be placed in a C++ project when reading input from this file instead of from the console?  I have a program and am trying to code it to read from a text file instead of have the input entered from the keyboard.  I don't know exactly where to place the file in my project.  Does it go in the folder with the header files, source files, or resource files?
ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phoffric
phoffric

The .vcproj advice is for case when running the program via VS. If you create the .exe file and run the .exe directly from a console, then put the text file in the same folder as the .exe file.
Avatar of NSing9

ASKER

That actually is where the file already was.  So thank you.  It appears that my problem is something else so I will post a separate question.