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
Write out pseudocode for a function called "and" that takes two arguments, both booleans, and returns the logical and of the inputs. DO NOT use the logical and operator: instead, w

write a program to find the area under the curve y=f(x) between x=a & x=b

Develop Diablo 2 LOD 1.13d Dupe Method for Closed Battle.net This hack is for diablo 2 lord of destruction The program must work on all realms, all cores, all ladders (4x rea

write a c++ program for minimum shelf downloads


What is a hash function? Hash function: This is the method from the set 'K' of keys into the set 'L' of memory addresses.   H: K → L These are used to verify the address

1. Basic Heap: Each memory location in our model of the RAM will be an instance of type Memory: 2. typedef union Memory_u Memory; 3. union Memory_u{ 4. char character;

Call by reference: Arguments to a function can be passed in two way; one by call by value and other by call by reference.  Call by value is passed either through a constant

Program is to read the contents of a file: void main()    {   ifstream fin("ascii.txt");   char ch;   while(! fin.eof())     {   fin>>ch;   cout     }

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