- Aug 4, 2001
- 967
- 0
- 0
I thought it posed no problem, but it doesn't seem to work for me. I have an abstract class (t3Object) with a pure virtual function, and one (for the moment) derived class from it. I wrote all the code for the virtual function in the derived class, no problem.
I create a vector of the base abstract class, and the compiler complains of the following:
\visual studio\vc98\include\stl\stl_vector.h(639) : error C2259: 't3Object' : cannot instantiate abstract class due to following members:
t3object.h(5) : see declaration of 't3Object'
\visual studio\vc98\include\stl\stl_alloc.h(195) : while compiling class-template member function 'void __thiscall std::vector<class t3Object,class std::__default_alloc_template<1,0> >::_M_insert_aux(class t3Object *,const class t3Object &)'
Anyone has an idea how to solve this?
I create a vector of the base abstract class, and the compiler complains of the following:
\visual studio\vc98\include\stl\stl_vector.h(639) : error C2259: 't3Object' : cannot instantiate abstract class due to following members:
t3object.h(5) : see declaration of 't3Object'
\visual studio\vc98\include\stl\stl_alloc.h(195) : while compiling class-template member function 'void __thiscall std::vector<class t3Object,class std::__default_alloc_template<1,0> >::_M_insert_aux(class t3Object *,const class t3Object &)'
Anyone has an idea how to solve this?