Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- #include<string>
- using namespace std;
- int main()
- {
- int i=0;
- ifstream in("in.txt");
- ofstream out("out.txt");
- string s;
- while ( in.peek() != EOF)
- {
- i ++;
- getline(in,s);
- out << s << " ";
- out <<i<<endl;
- }
- in.close();
- out.close();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement