+91 9945200008     support@uttaracomputers.com

Why not "operator>>" and "operator<<" be friends of class complex ?


Dear Sir, first of all I would like to thank you for providing wonderful C++ & OOPS discussions as part of the C++ Audioware.

I am so happy to learn C++ from your discussions.

I’ve few queries, which I ask one by one.

Q) Why not “operator>>” and “operator<<” be friends of class complex ?

In audio 04a 17:10 frame, you’ve said

“operator << and operator >> can’t be friends as we’re writing class complex today, they can only be global functions”

I didn’t understand this statement, as we can make them as friends of class complex and provide them as part of Interface to perform read and write operations on objects of class complex.

Requesting to answer whenever you’re comfortable. I am happy to hear from you.

Yours Sincerely,

Shakthi Prashanth


  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.