There is such a class:
class Foo { public: int bar; Foo(int b) { bar = b; } }; and here it is:
template<class T> class Bax { private: T *data; public: Bax() { data = new T[4]; } }; How to rewrite 2nd grade to make it work
Bax<Foo> bax; Bax<int> bax2; everything turned out to be much simpler .. just need to allocate memory not through new, but through malloc