Inheriting values from an object of a base class

1 view
Skip to first unread message

Shajahan ES

unread,
Jul 22, 2011, 11:49:32 PM7/22/11
to A++ Group
The question is: create a class student with data members rollno,
name, mark1, mark2. Now define a class result derived from ‘student’
with a data member result. now we are accepting the details in class
‘student‘ and then we are going to find the result/ total in class
‘result‘. For that the values of object of ‘student’ has to be copied
to ‘result’..

Solution is here: http://goforaplusplus.wordpress.com/2011/07/23/inheriting-values-from-an-object-of-a-base-class/

Got a better way to do this? mail it!! as reply!!

Shajahan ES

unread,
Jul 30, 2011, 11:08:42 AM7/30/11
to A++ Group
Hey guys, got a simple way to do the same : Inheriting values from an
object of a base class easily using pointers.
nd thnx to devika. coz she did this code.
Its really cool!!
its here: http://goforaplusplus.wordpress.com/2011/07/30/inheriting-values-from-an-object-of-a-base-class-easily-using-pointers/

Shafeeq K

unread,
Jul 30, 2011, 1:24:47 PM7/30/11
to goforap...@googlegroups.com
That was awesome.
Really great, because that is the way it was meant to be at first
place, Polymorphism.
Kudos to Devika, master mind of optimizations :)

Shafeeq

Reply all
Reply to author
Forward
0 new messages