Mark44
Mentor
- 38,031
- 10,506
It's a good idea to create descriptive names for your projects, but not good to go overboard on the names. I have several hundred projects that I've created over the years, but they're short with no spaces, to remind me what the basic purpose of the program is. Instead of "3.29 read write to file ifstream ofstream open close," I would have called the project "FileOutput."yungman said:I solved the problem. It is the name of my whole project I created!
What you describe may or may not be strange. The only other C/C++ compiler I've used was Borland's product, close to 30 years ago.yungman said:VS has strange things, I found the demofile.txt that created by the program now. Also VS is strange, I before I end up deleting the whole project, I tried to change the name of EVERY file inside, it's like every time I navigate around, I see new names that I missed the first time! It just did not work trying to rename the files, finally, I had to take out the source.cpp, then try to delete. Then I had to close all the other projects ( I had the ifstream project opened in another VS program) in order to even create the new 3.29 ofstream.
Now my other ifstream doesn't read the demofile.txt. That's another story for another day. I want to work on that first.
If you don't provide the complete path to the file, where the file needs to be depends on whether you're running your program from the debugger or from a command prompt window.
If you're running from within the debugger, the input file or output file has to be in the same directory as the source code.
If you're running the program from a command prompt window, the input file or output file has to be in the same directory as the executable.
If you do provide the complete path to the input or output file, it doesn't matter where the file is -- the program can find the file.
Last edited: