Advertisement
Guest User

Untitled

a guest
May 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include "Vector.h"
  2.  
  3. Vector::Vector()
  4. {
  5. //ctor
  6. }
  7.  
  8. Vector::~Vector()
  9. {
  10. //dtor
  11. }
  12.  
  13. void Vector::push (std::unique_ptr<Vehicle> toPush)
  14. {
  15. content.push_back(toPush);
  16.  
  17. }
  18.  
  19. void Vector::pop (int toPop)
  20. {
  21. content.erase(content.begin()+toPop);
  22. }
  23.  
  24. void Vector::showAll(std::ostream& out)
  25. {
  26. for (int i=0; i<content.size(); ++i)
  27. {
  28. out<<i+1<<" "<<*(content[i])<<"\n";
  29. }
  30. }
  31. int Vector::getSize()
  32. {
  33. return content.size();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement