fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <memory>
  4. using namespace std;
  5.  
  6. struct Yoba {
  7.  
  8.  
  9. };
  10.  
  11. struct Yoba2 : public Yoba {
  12. virtual ~Yoba2() = default;
  13. };
  14.  
  15. struct Yoba3 : public Yoba {
  16. virtual ~Yoba3() = default;
  17. };
  18.  
  19. typedef std::vector<std::unique_ptr<Yoba> > Storage;
  20.  
  21.  
  22. int main() {
  23. Storage a;
  24. a.push_back (make_unique<Yoba2>(Yoba2()));
  25. a.push_back (make_unique<Yoba3>(Yoba3()));
  26.  
  27. // your code goes here
  28. return 0;
  29. }
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty