#include struct pizza { char size; int toppings; }; void status(pizza tony, pizza betty); void report(pizza thePizza, char name[]); int equal(pizza tony, pizza betty); pizza newPizza(char size, int toppings); void main() { pizza tony, betty; tony = newPizza('s',3); // construct a new pizza betty = newPizza('l',3); status(tony, betty); // see if this will COPY the MEMBERS (it WILL!) tony = betty; cout << "after assignment : " << endl; status(tony, betty); betty.toppings = 666; cout << "after zapping betty" << endl; status(tony, betty); } void status(pizza tony, pizza betty) { report(tony, "tony"); report(betty, "betty"); if (equal(tony, betty)) cout << "same."; else cout << "different."; cout << endl; } // pizza constructor pizza newPizza(char size, int toppings) { pizza temp; temp.size = size; temp.toppings = toppings; return (temp); } int equal(pizza tony, pizza betty) { int isEqual; isEqual = (tony.toppings == betty.toppings) && (tony.size == betty.size); return isEqual; } void report(pizza thePizza, char name[]) { cout << name << " has " << thePizza.toppings << " toppings,"; cout << "and is a '" << thePizza.size << "'." << endl; cout << endl; }