Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 229

Comment by Peter - Reinstate Monica on Understanding "return *this"

$
0
0
It could be noted that references are often only syntactic sugar (or always, depending where your sugar ends). For example, if the functions returned pointers instead, one could write obj.setNum(10)->displayNum();, no damage done.

Viewing all articles
Browse latest Browse all 229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>