// File: vtest0.cpp // // Testing virtual functions #include #include "Box.h" #include "Cube.h" #include "ColorCube.h" using namespace std ; int main() { Box b(1.2, 2.4, 2.4) ; Cube c(7.1) ; ColorCube cc(2.3, ColorCube::blue) ; Box& b1 = cc ; Box b2 = cc ; b1.identify() ; b2.identify() ; Cube *ptr = &cc ; ptr->identify() ; }