I am trying to read from a txt file but when I use :-
It fails to locate the txt file, which is what is holding the data I wish to use.
I believe my actual code is correct, and so believe it is just that Visual Studio doesn't know where to locate the file.
Here is my code:-
This is for some practice on a test we had last week, and we were given a pre-made Microsoft Visual Studio Solution file, which fired straight up and contained the txt file, but we use a strange college specific library.
using namespace std;
const int MAXPATIENTS = 10;
patient patientstruct[MAXPATIENTS];//array of structs
cout << "phail " << endl;
cout << "opened" << endl;
So basically I'm asking how I can use the StreamName.open("Dieters.txt"); line to point to the location of the txt file so that V.Studio can find it, as the code I have posted above works fine when I don't have to use the weird library.
Many thanks for any help!