Total members 10249 | Gratitudes |It is currently Thu May 17, 2012 8:44 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: What is Operator Overloading? !!!
PostPosted: Wed Jul 04, 2007 12:36 am 
Offline
Beginner
User avatar

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;


Here, the ط£آ¢أ¢â€ڑآ¬ط¹آ©+ط£آ¢أ¢â€ڑآ¬أ¢â€‍آ¢ operator and the ط£آ¢أ¢â€ڑآ¬ط¹آ©-ط£آ¢أ¢â€ڑآ¬أ¢â€‍آ¢ operator have been overloaded to perform custom operations for the Date class.

Thanks alot


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

 Similar topics
 operator overloading
 working of bitwise ~ operator
 stream operator
 unary operator overloading
 Sizeof Operator
 Function Overloading
 overloading << and >>
 operator int()
 What is the % operator
 difference between the Boolean & operator and the &&

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team