IT Community - Software Programming, Web Development and Technical Support

Operator overloading in C++

This is a discussion on Operator overloading in C++ within the C and C++ Programming forums, part of the Software Development category; can any one share operator overloading in C++ Thanks Prasath.K...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C and C++ Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-16-2007, 05:58 AM
prasath prasath is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Location: Chennai
Posts: 173
prasath is on a distinguished road
Wink Operator overloading in C++

can any one share operator overloading in C++



Thanks
Prasath.K
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-16-2007, 06:51 AM
lavanya lavanya is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 24
lavanya is on a distinguished road
Thumbs up Re: Operator overloading in C++

HI.,

Operator Overloading:
The Operator overloading is the ability to tell the compiler how to perform the certain operation when its corresponding operator is used on one or more variables.

For Example:
  • Using the substraction operator"-" the compiler acts differently depending upon how the operator is being used.
  • When it placed the left of the numeric value that is -5 the compiler consider it as the negative value.
  • When used between the two integer value that is 101-99 the compiler applies the substraction operation

  • When used the integer and the floating value that is 110-9.5 the compilersubstracts the left no from the right no.


Thanks,

Lavanya.J
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between function overloading and operator overloading vigneshgets C and C++ Programming 6 10-23-2008 11:01 AM
Overloading and overriding vijayanand Java Programming 1 09-21-2007 12:25 AM
What is the difference between “overloading” and “overridding”? Arun C and C++ Programming 1 07-20-2007 07:46 AM
Does Python supports Operator Overloading? vadivelanvaidyanathan Python 1 07-17-2007 03:10 AM
Diff of Overloading and Overriding vigneshgets C and C++ Programming 1 05-18-2007 04:17 AM


All times are GMT -7. The time now is 06:58 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0