I have a struct struct_A, basically it has some vectors and props, no functions.
I have the classB, that has an internal instance of struct_A, created on the heap.
I have tha classC. I want this class extends the struct_A. So I have :
1 2 3 4 5 6 7 8 9 10 11 12 13
ClassC : public struct_A
{ public :
ClassC();
}
ClassC::ClassC () : struct_A() {
classB classb_instance;
// Here is my problem I dont know how to get the instance_of_struct_A and
// asociate it to my struct_A
this->struc_A = classb_instance.instance_of_structA ; ?????
}
By now I only have been able to do a deep copy of every member. my_classA.data??? = classb_instance.instanca_of_structA.data????:
ne555.... this is what I'd have to write for operator = isnt't ?
The Hamsterman proposal ... I can't compile nothing like that.... (or I dont know how to )
But, ok, by now a deep copy can be a solution. But the question is ' Is not possible to copy by pointer ? Some kind of casting ?