Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <fstream>
- #include <iomanip>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream f("in.txt");
- ofstream g("out.txt");
- vector<string> v;
- string a;
- while (getline(f, a))
- v.push_back(a);
- while (!v.empty())
- {
- g << v.back() << "\n";
- v.pop_back();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement