Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. int main()
  2. {
  3.  
  4. string from, to;
  5. std::cin>>from>>to;
  6.  
  7. ifstream is (from.c_str());
  8. istream_iterator<string> ii(is);
  9. istream_iterator<string> eos;
  10.  
  11. std::vector <string> my_vector(ii,eos);
  12. sort(my_vector.begin(),my_vector.end());
  13.  
  14. ofstream os (to.c_str());
  15. ostream_iterator<string> oo(os);
  16.  
  17. copy(victor.begin(),my_vector.end(),oo);
  18.  
  19. return !is.eof()||! os;
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement