Question subject: What is Operator Overloading? !!!
Posted: Wed Jul 04, 2007 12:36 am
Joined: Wed Mar 28, 2007 1:17 pm Posts: 118 Location: Cairo-Egypt Has thanked: 0 time Have thanks: 5 time
What is Operator Overloading? -----------------------------------------------
C++ lets you build operators that implement unary and binary operations on objects o classes. This is called as Operator overloading. You can write a function to make the operator do your custom operation. For example:
Code:
Date dt1( 1,2, 2004); Date dt2( 2,4, 2005); Dt1+=100; Int diff = dt2-dt1;