Game Programming I Week three.
|
This week of programming has been a bit more slow paced then the two previous ones. Hence we have been going through classes the whole week. The only new thing this week was class heritage, that a class can contain an other class by, heritage. This is declared by
class Animal
{
private:
int size;
public:
int GetSize(size)
{
return size;
}
};
class Fish: Public Animal //Better to set Animal as protected
{
};
This means that the things inside class fish now contains class animal. |