May 21st, 2009, 06:32 PM
Alright, simple problem, hopefully simple solution.
This is going to seem like a stupid question, I know but I'm having some difficulty with struct inheritance.
Here's what I have:
//more elements here
A* pa = new B();
pb = pa;//this is the important part
Do I need an explicit cast here?
Also, say I was trying to do:
b = a;
Do I need a new constructor B(A a) in B to handle this or is there another way?
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!