#include #include #include using namespace std; int main () { fstream myfile; myfile.open("testfile.txt"); if(myfile.fail()){ cout << "Unable to locate testfile.txt" << endl; exit(0); } while(myfile.good()){ string str; myfile >> str; cout << str << endl; } return 0; }