Click here to Skip to main content
15,879,348 members
Articles / Programming Languages / C++
Alternative
Tip/Trick

Operator overloading in C++

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
28 Oct 2011CPOL 13.7K   1
The original solution has many flaws. Arguments and return types are not what they should be in most cases (by value vs. by reference and also for the constness). No code reuse and also some operators are not doing what would be intuitive like the unary minus.Information here is much more...

The original solution has many flaws. Arguments and return types are not what they should be in most cases (by value vs. by reference and also for the constness). No code reuse and also some operators are not doing what would be intuitive like the unary minus.


Information here is much more useful and exact:


License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
Programmer at Maid LABS from 2003 (www.maidlabs.com)

Programmer-Analyst at Viasat Geo Technoligies from 1995 to 2002 (www.viasat-geo.com).

I have studied at École Polytechnique de Montréal in computer engineering.

Comments and Discussions

 
GeneralReason for my vote of 5 Agree to everything. Also, quite use... Pin
Stefan_Lang6-Nov-11 23:08
Stefan_Lang6-Nov-11 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.