Need help with a homework assignment

Pages: 12
Should I change the file to output then? Because it is failing to even make one with ifstream.
closed account (48T7M4Gy)
If you are in the right directory you don't need to change your program. It works fine as my output above showed.

The number of words appears with your message in the cmd box
Last edited on
If the file doesn't exist, why would you be trying to open it for input?
closed account (48T7M4Gy)
What is happening lazy? Have you made up a file in notepad with a few words in it, then saved it as sample.txt, then copied the file into the debug directory?
Last edited on
Made a file, dragged it to debug folder. Tried entering the name in cmd when running the program, and the program is unable to open the file.
closed account (48T7M4Gy)
What are the names of the files in the debug folder please?
I have a txt files named :
MyProgrammingLabProject
A source browser data base file that has my name and the project number.
the sample txt file
then 2 vc120 source browser data bases.
closed account (48T7M4Gy)
this means you are in the wrong directory. You must find the directory named Debug with your .exe file.
Topic archived. No new replies allowed.
Pages: 12