0

What are operator functions in C++?

3rd Feb 2017, 7:56 AM
Srikanth Srinivasan
Srikanth Srinivasan - avatar
2 odpowiedzi
+ 1
Operator functions define what exactly operator (like ++ OR += etc) do. Those are defined at a low level for (basic) datatypes but you can overload them for your own classes.
3rd Feb 2017, 8:33 AM
Norbivar
Norbivar - avatar
+ 1
An example of operator overlaoding: https://code.sololearn.com/c4BgbEv35NSx/#cpp Implements pre- and post-increment as well as assignment for the class. Should give you the gist of it...
3rd Feb 2017, 2:46 PM
Ettienne Gilbert
Ettienne Gilbert - avatar