Senin, 04 April 2011

Operator overloading

Operator overloading
Privileges program C + + is the existence of operator overloading facilities, namely
naming does not function like in general, but the name of the function keyword
operator followed by the operator symbol is used. For example the name of the function
operator = that can be called with only write the operator = as in surgery
regular assignment, so it can be its own version of the assignment functions for types
certain data, such as we can express Time t2 = t1, and so forth. Now
operators that can be used as listed in the following list:
 
+      -    *     /      %   ^   &   |
~     !     =   < >  +=  -=  *=
/=  %=  ^=  &=  |=   <<  >>  >>=
<<=  ==  !=  <=  >=  &&  ||  ++
--  ->*  ,  ->   []  ()   new   delete

Tidak ada komentar:

Posting Komentar