Click here to Skip to main content
Click here to Skip to main content

Operator overloading in C++

By , 28 Oct 2011
 

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)

About the Author

Philippe Mori
Web Developer
Canada Canada
Member
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.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralReason for my vote of 5 Agree to everything. Also, quite use...memberStefan_Lang6 Nov '11 - 23:08 
Reason for my vote of 5
Agree to everything.
Also, quite useful links.

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 28 Oct 2011
Article Copyright 2011 by Philippe Mori
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid