Here is what i came up with:
it doesnt display anything. I have double and triple checked the test.txt and it does contain text. Could someone please help.Code:#include <fstream>
#include <iostream>
using namespace std;
int main()
{
string str;
ifstream a_file( "C:\test.txt" );
a_file>>str;
cout<<str;
cin.get();
}