Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iterator>
- #include <algorithm>
- #include <set>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "Russian");
- fstream fst("file_name.txt");
- istream_iterator<int> fst_it(fst);
- istream_iterator<int> end_of_file;
- multiset<int> s(fst_it, end_of_file);
- fst.close();
- fst.open("file_name.txt");
- ostream_iterator<int> ost(fst, " ");
- copy(begin(s), end(s), ost);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement