I am simply trying to read information from a text file. I have created a text file already with the name inData.txt. Here is what I have in my text file:
Okay, so I have checked to see if the file was successfully opened. It appears not to be...So, why would my text file have troubles opening? I have used the exact name of the text file in my code.
I'm not sure if there are any errors in your code, as I am new to C++ (and programming). However, I have had this problem before. My issue was the location of my text file. I had to store the text file in the same folder as the source for my code.
I'm not sure if you have already done this, but I feel like it is the simplest thing to try before messing with all of the code. I'm sorry if this doesn't help!