#include #include using namespace std; struct animal { string name; animal(string n){ name = n; cout << "A new animal! Name is " << name << endl; printf("This will print out too!\n"); } ~animal(){ printf("Disposing of animal %s\n", name.c_str()); } }; int main(){ animal z("Zebra"); printf("Address of z is %lx\n", &z); animal *a = new animal("Aardvark"); printf("Address of a is %lx\n", a); animal *b = (animal*)malloc(sizeof(animal)); printf("Address of b is %lx\n", b); delete a; delete b; return 0; }