Basically, I am trying to let the user select a file given a selection box and given that users input, I want to open their selected .txt file as an ifstream and read from it. The file will not open for some strange reason and I have tried everything I have thought of. Any help would be greatly appreciated, thanks!
I have that in order to set the string filename as the path to the file. In the code above, I changed the single '\' character into '\\' each time it appears, which is needed to open the file correctly, right? I've tried it without that piece of code as well using just the '\' characters in the file name but it still doesn't open the file. I have looked at the file name and it matches exactly what the user selects from the window which is causing my confusion.