cant seem to read from this my file "d.txt", i know this is quite simple
code but its just not working, and yes file "d.txt" is in the same directory as the .cpp & .exe
#include <fstream.h>
#include <iostream.h>
#include <stdlib.h>
int main()
{
char ch;
//int check = 0;
ifstream file;
file.open("d.txt");
if(file.is_open())
{
while (!file.eof())
{
//check = check + 1;
file.get(ch);
cout<<ch;
}
cout<<endl;
}
else
{
cout<<"file could not be found"<<endl;
}
system("PAUSE");
return 0;
}