Hi,
I got answer for this.
when we use objects instead of pointers , then compile time else run time.
1)class Base
{
public:
virtual void show()
{
}
}
0
int main()
{
Base obj;
obj.show() // I think complite time polymorphism comes here.
Base *obj = new Base()
obj->show() // RUN Time
}
Please correct me if I am wrong . I would like to know why this happens like so.
GopiKrishna Komanduri
Software engineer
Hyderabad
[email protected]
--- On Wed, 2/9/09, Gopi Krishna Komanduri <[email protected]> wrote:
From: Gopi Krishna Komanduri <[email protected]>
Subject: [c-prog] some basic queries about polymorphism
To: [email protected]
Date: Wednesday, 2 September, 2009, 12:45 AM
Hi Folks,
I ahve some basic queries related to polymorphism.
for example:
1)class Base
{
public:
virtual void show()
{
}
}
0
int main()
{
Base obj;
obj.show() // I think complite time polymorphism comes here. Am I correct ?
Base *obj = new Base()
obj->show() // Compile time polymorphism .. Am I correct?
}
Thx,
--Gopi
9705355488
See the Web's breaking stories, chosen by people like you. Check out Yahoo!
Buzz. http://in.buzz. yahoo.com/
[Non-text portions of this message have been removed]
See the Web's breaking stories, chosen by people like you. Check out
Yahoo! Buzz. http://in.buzz.yahoo.com/
[Non-text portions of this message have been removed]