Okay,
I am trying to get this program to read all contents of a text file and then print it. I have a file called tanner1.txt already made. The program only opens up and never gets through the loop. If anyone could help me, it would be appreciated.
This is what I have:
#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>
int main()
{
double var;
ifstream file("tanner1.txt");
while(!file.eof());
{
file>>var;
cout<<var;
}
file.close();
system("PAUSE");
return 0;
Thanks