class a
{
protected:
const int _ID;
public:
a::a(int id){};
a::top(int num);
};
class b : public a
{
static int ok;
b::b(int id):a(id){};
a::top(ok);
}
int main()
{
int t=5;
b opj=b(t);
}
first why i get this compile error that solved only when i remove the const
non-static const member ‘const int Student::_ID’, can't use default assignment operator - instantiated from ‘void std::vector::_M_insert_aux(__gnu_cxx::__normal_iterator, const _Tp&) [with _Tp = Student, _Alloc = std::allocator]’
second
i have anther problem
undefined reference to b::ok