FidoNet Echomail Archive
c_echo

<<< Previous Index Next >>>

From: Pascal Schmidt
To: Neil Heller
Date: 2004-07-28 16:30:50
Subject: Polymorphism ?

Hi Neil! :-)

 NH> #1  opa->foo();
 NH> #2  opb(opa)->foo();
 NH> Line #1 would do class A's foo() and line #2 would do class B's 
 NH> foo(). Is that not the action of a polymorphic variable?
Not quite, the original object is unquestianably of type A. A polymorphic
variable would be one that can store an object of arbitrary type. A void
pointer in plain C comes close.

Ciao
Pascal

--- Msged/LNX 6.1.1
 * Origin: Linux kernel 2.6.7 on Slackware 9.1 (1:153/401.2)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267


<<< Previous Index Next >>>