B
Brian Dumas
I would like to do something like the following
class TMyClass
{
......
}
TMyClass* mc1 = new TMyClass;
TMyClass* mc2 = new TMyClass;
TMyClass* mc3=mc1+mc2;
Where the addition mc1+mc2 would take the desired information from each
object, put them together , then store them mc3. I tried overloading the
operator+, but when I compile the mc3=mc1+mc2 line, the compiler complains
about invalid pointer addition.
Anyone have an ideas?
Thanks for any and all help. It is greatly appreciated.
Brian Dumas
class TMyClass
{
......
}
TMyClass* mc1 = new TMyClass;
TMyClass* mc2 = new TMyClass;
TMyClass* mc3=mc1+mc2;
Where the addition mc1+mc2 would take the desired information from each
object, put them together , then store them mc3. I tried overloading the
operator+, but when I compile the mc3=mc1+mc2 line, the compiler complains
about invalid pointer addition.
Anyone have an ideas?
Thanks for any and all help. It is greatly appreciated.
Brian Dumas