#include //#include "Point.h" #include "Segment.h" using namespace std; int main () { //Point p(3,4); // you can try this after adding new constructor in Point.h //p.print(); // ... and after defining print() in Point.h Point p2; //p2.print(); Segment *s = new Segment(); Segment s1; //watch out!!! //*s is a dynamically allocated object , which lives in heap memory //..while s1 is object that is a local variable , which lives in stack memory // when do they get killed? s->print(); //delete s; cerr << "\n s deleted\n"; return 0; }