Hello, I am very new to c++ and all I am trying to do is use the fstream to open a .dat file and interpret the 14 different lengths to the program. The problem is, it won't open the file. What am I doing wrong? I've looked in my books - I've tried different permutations - nothing is working. Can I get some help?
Also, something like this: ifstream in("input.txt"); will either point to the folder with the .cpp opening the folder or the folder that the .exe is (depending upon if you're doing a compile-run, or just run).
Your files are arranged on your hard drive in directories. You might know these as folders. You need to write in the complete name of the directory containing your file. You can discover this by using your file explorer. For example, it might be something like: