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
to design a car that travels along the room and gives the length of the room

Described multiple inheritance(virtual inheritance)? And explain its advantages and disadvantages? A: It is the procedure in which a child can be derived from more than one pare

Q: Name the operators which cannot be overloaded? A:sizeof, ., .*, .->, ::, ?:

how is a beti a beti

want to understand the working of structure and classes

THEORY OF A COMPUTER PROGRAMMING

ABC Car Dealership needs your help to update the ordering system. This car dealer is selling four types of vehicles: Sedan, Truck, SUV, and mini Van. And each type of vehicle can h

How do you know that your class requires a virtual destructor? A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality. Th

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome