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
Program is to display the contents of file on a screen: Write a program to display the contents of file on a screen void main()   {  clrscr();  ifstream fin("ascii

Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor

Draw a circle in c program: void main() { clrscr(); int i,r=50,t,j,x,y; int gd,gm; gd =DETECT; initgraph(&gd,&gm,""); for(x=50;x for(y=50;y {   i

write a class player that contain attributes for the player,s name,average and team

Write a Program that illustrate Command Line Parameters? main(int argc, char *argv[]) { int i; for(i = 0; i printf("arg %d: %s\n", i, argv[i]); return 0; }

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and


.Create a Csharp solution that will show a maze in the user interface and will show a mouse walking through the maze attempting to locate the exit door (the cheese).

Define The Return Statement in Computer Programming? The return statement is used for two purposes once the return statement is executed the program control will be immediately

Static Class Members As we already know all the objects of the class have dissimilar data members but invoke the similar member functions. Though, there is an exception to this