// using extraction operator to print file contents on screen // Mikhail Nesterenko // 2/25/2016 #include #include #include using std::string; using std::ifstream; using std::ofstream; using std::cin; using std::cout; using std::endl; int main(){ // inputing file name cout << "Input file name to print: "; string fileName; cin >> fileName; // opening file ifstream fin(fileName.c_str()); // printing string word; while(fin >> word) cout << word << endl; fin.close(); }