Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T> MyClass
- {
- public:
- void DoSomething(){}
- };
- class Base {
- public:
- virtual ~Base(){}
- virtual void DoSomething() = 0;
- }
- template <class T> class MyClass : public Base {
- public:
- void DoSomething(){}
- };
- std::vector<Base *> objects;
- objects.push_back(new MyClass<int>);
- objects.push_back(new MyClass<char>);
Add Comment
Please, Sign In to add comment