Derived class can't declare
Ok, somehow i think this is weird. I'm gonna summarized my whole code:
Code:
class Sphere;
class Rectangle;
class Segment;
class Body
{
public:
vect2 Velocity, Position;
float mass
Body(){}
//then other stuff and functions will go on
//I also have some virtual bool function in here named "Collision"
};
class Sphere: public Body
{
public:
float Radius;
Sphere(){}
//Then the collision functions will go on
};
So that's basically it. Then when i tried to do this:
it gave an error like this:
Code:
error C2259: 'Sphere' : cannot instantiate abstract class due to following members:
see declaration of 'Sphere'
Can someone help me out here?