Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. #include <fstream>
  5.  
  6. using namespace std;
  7.  
  8. class Person
  9. {
  10.  
  11. };
  12.  
  13. class Car
  14. {
  15. public:
  16. string CarModel;
  17. Person* Owner;
  18. Person* Driver;
  19. };
  20. int main()
  21. {
  22. ifstream in;
  23. in.open("input.txt");
  24. int n;
  25. //cin >> n;
  26. string data;
  27. vector <string> persons;
  28. while (in >> data)
  29. {
  30. persons.push_back(data);
  31. }
  32. in.close();
  33. ofstream out;
  34. out.open("output.txt");
  35. int m;
  36. //cin >> m;
  37. for (int i=0; i<m; i++)
  38. {
  39. out << persons[i] << " ";
  40. }
  41. out.close();
  42.  
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement