Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
#include "animal.h"
2
3
//eating living things kill them
4
//eating makes an animal grow
5
void
6
animal::eat(livingThing *food) {
7
food->die();
8
grow();
9
}
10
11