@ayush
I am giving overall design ...
class shape
{
public:
virtual void display()=0;
};
class triangle :public shape
{
public:
void dispaly()
{}
};
class circle: public shape
{ public:
void dispaly()
{}
}
void main()
{
shape *bptr;
triangle tr;
circle ci;
....
.....
if(character input=='t')
bptr=&tr;
else
bptr=&ci;
bptr->display();
}
With regards,
Praveen Raj
DCE-IT 3rd yr
9999735993
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.