Tells the operators one can override; which operators , C/C++ Programming

Q:  Tells the operators one can override; which operators should he override?

A: Bottom line: don't puzzle your users.

Remember the reason of operator overloading: to decrease the cost and defect rate in code that uses your class. If you create operators which confuse users (because they're cool, because they make the code faster, since you have to prove to yourself that you can do it; doesn't really matter why), you've violated the entire reason for using operator overloading in the first place.

 

Posted Date: 3/20/2013 3:47:55 AM | Location : United States







Related Discussions:- Tells the operators one can override; which operators , Assignment Help, Ask Question on Tells the operators one can override; which operators , Get Answer, Expert's Help, Tells the operators one can override; which operators Discussions

Write discussion on Tells the operators one can override; which operators
Your posts are moderated
Related Questions
Calculate the salary if the person work 8 hours/day and the salary/hour is RM5.20 - UML class diagaram -Class -Exception handling/assertion


big-m method operation reseach in progrmme c++..

Normal 0 false false false EN-US X-NONE X-NONE

I am seeking an expert to create a 360 degree virtual tour in KRPano for use on PCs, tablets and smartphones. You will be given with panoramas in order to create an advanced KRPano

Program is to read the characters from keyboard: Program is to read the characters from keyboard one by one stored in different files as upper constants, lower constants, othe

How to write a global inline function First, let's get away from member functions for a moment and consider a global function.  To make a request that this function be in line:

A: By keeping along with the C++ tradition of "there's more than one method to do that" (translation: "give programmers options & tradeoffs so they can choose what's best for them

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

A: Mostly can be overloaded. The only C operators which can't be are. and?: (and sizeof, that is technically an operator). C++ adds a few of its own operators, mostly which can be