int main()
{
	Cents cMark(5); // calls Cents constructor
	Cents cNancy = cMark; // calls Cents copy constructor!
	std::cout << cNancy.getCents() << "\n";	
	return 0;
}
Exemple #2
0
int main()
{
	Cents cents1(6);
	Cents cents2(2);
	Cents centsSum = cents1 - cents2;
	std::cout << "I have " << centsSum.getCents() << " cents." << std::endl;
 
	return 0;
}