summaryrefslogtreecommitdiff
path: root/CPP/Basics/main.cpp
blob: 1b6d751394c810e2b121dd492e56cfb928fab31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <string>
#include "cow.h"

int main(void) {
	cow *my_cow;
	my_cow = new cow("Hildy", 7, PET);

	std::cout << my_cow->get_name() << " is a type - " <<
		(int)my_cow->get_purpose() <<
		std::endl;

	std::cout << my_cow->get_name() << " is " <<
		my_cow->get_age() << " years old" <<
		std::endl;


	my_cow->set_age(24);
	std::cout << my_cow->get_name() << " is NOW " <<
		my_cow->get_age() << " years old" <<
		std::endl;

	delete my_cow;
	return 0;
}