aboutsummaryrefslogtreecommitdiff
path: root/week04/Exercise2.cpp
blob: 4805fdf4bc0eca6e1380c9e57801d8b1f1343952 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct Bee {
	float age;
	char type;
};

struct BeeHive {
private:
	Bee* roaming;
	Bee* eggs;

public:
	BeeHive(int roamingCapacity, int eggCapacity) {
		roaming = new Bee[roamingCapacity];
		eggs = new Bee[eggCapacity];
	}
	~BeeHive() {
		delete[] roaming;
		delete[] eggs;
	}
};