#include "stdafx.h" #ifdef UNICODE #define cout std::wcout #endif int _tmain(int argc, _TCHAR *argv[]) { string line; ifstream myfile("example.txt"); if(myfile.is_open()) { while(!myfile.eof()) { getline(myfile, line); cout << line << endl; } myfile.close(); } else cout << "Unable to open file"; return(0); }