In the first (and further) example of interface's tutorial..this is used
" CRectangle rect;
CTriangle trgl;
CPolygon * ppoly1 = ▭
CPolygon * ppoly2 = &trgl;
ppoly1->set_values (4,5);
ppoly2->set_values (4,5);
"
I can use this also-
" rect.set_values (4,5);
trgl.set_values (4,5);
"
WHY SHOULD I USE THE EARLIER ONE???? WHY IS IT SPECIAL??? WHAT ARE THE SPECIAL FETURES??
okay.
any why making pointer of base class'es type more important that of derived class'es type..?
It's not more important. They're both useful in the right place.
Last edited on
okay..concept is clear now. Thanks a lot !