Object question

I am studying C++ as a newer, I would like to know the idea for the following lines as possible to work?

Thanks any experts to help.

1
2
3
4
iOpSetA = myObj;    // iOpSetA = myObj->operator IOperationSetA*();
iOpSetB = iOpSetA;  // iOpSetA->operator IOperationSetB*();
iOpSetA = iOpSetB;  // iOpSetB->operator IOperationSetA*();
Insufficient details.
If those operators exist, you'd invoke them with:
1
2
3
iOpSetA = *myObj;    // iOpSetA = myObj->operator IOperationSetA*();
iOpSetB = *iOpSetA;  // iOpSetA->operator IOperationSetB*();
iOpSetA = *iOpSetB;  // iOpSetB->operator IOperationSetA*(); 

You need to dereference the pointer to invoke the conversion.
Topic archived. No new replies allowed.