Получите функцию в CPP.
ifstream outfile ("myfile.txt");
char ch;
while(outfile)
{
outfile.get(ch);
cout << ch;
}
Sleep deprived
ifstream outfile ("myfile.txt");
char ch;
while(outfile)
{
outfile.get(ch);
cout << ch;
}