screenshot Hi guys I'm trying to read a text file that has 3 doubles in a row and then save these three values into my variables ( 1 variable per double).
So far my code is looking like this:
cout<<"ready to read file...:";
ifstream theFile("pose.txt");
double first,second,third;
while(theFile >> first >> second >> third){
cout<<"In while loop and got following values: ";
cout<< first<<endl<< second <<endl<< third;
}
And my input file looks like this when opened:
1.5 2.4 3.3
However even though the first cout runs and it tells me that the program is ready to read the file, it doesn't enter the while loop.
I've tried using other methods of reading the file which have also been ineffective.
Any help is welcome, Thanks.