How to call the operator << on an object instance ?

I have MyclassA and operator << for it.
From MyclassB I have a public instance of MyclassA
( MyclassA * theclassA; )
( In turn, I have into my main a simple MyclassB myclassB; )

So ... I want to write
myclassB->theclassA<<"hello"

error: invalid operands of types 'MyclassA*' and 'const char [5]' to binary 'operator<<'

( This classA works fine if it is instantiated without pointer approach : MyclassA theclassA; )

Any idea ? Thanks

Last edited on
Try this -> *(myclassB->theclassA) << "hello";
Thank you very much
Topic archived. No new replies allowed.