Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <fstream>
- #include <iostream>
- using namespace std;
- int main()
- {
- string input;
- string fileName;
- int x = 0;
- cout << "Please enter your file name: ";
- cin >> fileName;
- ifstream fin(fileName);
- while (getline(fin, input)){
- cout << input << endl;
- x++;
- }
- if (x < 10){
- cout << "The entire program has been displayed.";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement