What is the compound assignment operator overloading syntax? I cannot find on the web. How can for example overload operator+= ?
I know that it has to be a member function but what has to be its return value? reference?

Recommended Answers

All 3 Replies

>I cannot find on the web.
You didn't look very hard, did you? This is the first hit from google that I got using keywords from your thread title.

Sorry, I have found it, but somehow cannot see :)

I can't do anything about your eyesight. But it does show an example of how to define the function under the heading "Compound Assignment Operators += -= *=".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.