Jul 17, 2012 at 3:45pm
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??
Jul 17, 2012 at 4:41pm
okay.
any why making pointer of base class'es type more important that of derived class'es type..?
Jul 17, 2012 at 4:48pm
It's not more important. They're both useful in the right place.
Last edited on Jul 17, 2012 at 4:48pm
Jul 18, 2012 at 7:09am
okay..concept is clear now. Thanks a lot !