SHARE
TWEET

Untitled

a guest Dec 17th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class IAnimal{
  2. public:
  3.    virtual void fuu() = 0;
  4. };
  5.  
  6. class Animal : public IAnimal{
  7. public:
  8.    Animal(){}
  9.    void fuu(){}
  10. };
  11.  
  12. template<class... anyClass>
  13. class Farm{
  14. public:
  15.     Farm(anyClass... arg){
  16.     //Как поместить список аргументов конструктора в вектор.
  17. }
  18. private:
  19. std::vector<IAnimal*> vec;
  20. };
  21.  
  22. int main(){
  23.  
  24.     IAnimal* dog = new Animal();
  25.     IAnimal* cat = new Animal();
  26.  
  27.     Farm<IAnimal*, IAnimal*> obj(dog,cat);
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top