#include<iostream>
#include<fstream>
usingnamespace std;
int main(void)
{
// You must use double slash in paths (\\) or a single forward slash( /)
ifstream openFile("d:\\fkjkj.txt"); // or "d:/fkjkj.txt"
// You should check whether file is open
if(!openFile.is_open())
{
cout <<"could not open file";
return 1;
}
char ch;
while(!openFile.eof())
{
openFile.get(ch);
cout<<ch;
}
openFile.close();
return 0;
}