| timho11 (1) | |
|
Hi all, I have a class A consisting of a member data which is a pointer B* that points to some abstract class B. Now when I try to write the copy constructor of the class A, I don't know how to handle the copying of the data B*. I cannot use "new" as it is abstract. Does that mean I have to write some virtual constructor for class B? Please help, Thanks in advance | |
|
|
|
| Stewbond (1843) | |||
Why can't use you new?
| |||
|
Last edited on
|
|||
| fun2code (1227) | |
| Answer to clearly rhetorical question removed. | |
|
Last edited on
|
|
| Stewbond (1843) | |
| Yes, I did miss the abstract part. That was pretty interesting to read. | |
|
|
|