ItemInfo* item; ... double total = item->price; cout << "Color: " << item->getColor();Accessing an instance variable of a class object is very much like accessing a variable member of a struct.
Calling a method on a class object is also described as passing a message to the object.