Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > operator overloading and virtual funtions

Reply
Thread Tools

operator overloading and virtual funtions

 
 
ravinderthakur@gmail.com
Guest
Posts: n/a
 
      01-30-2006
hi all experts,

i was just thinking about making overloaded operators virtual. i was
wordering what could be the
implications of such scenarios.


i will be thankful if somebody can provide point out some general
issues in making overloaded virtual or point me to some resource
having explaination about the same.



thanks
ravinder.

 
Reply With Quote
 
 
 
 
Bob Hairgrove
Guest
Posts: n/a
 
      01-30-2006
On 30 Jan 2006 04:56:52 -0800, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

>hi all experts,
>
>i was just thinking about making overloaded operators virtual. i was
>wordering what could be the
>implications of such scenarios.
>
>
>i will be thankful if somebody can provide point out some general
>issues in making overloaded virtual or point me to some resource
>having explaination about the same.


Have you read the FAQ yet?
http://www.parashift.com/c++-faq-lit...erloading.html

Don't forget that there is a difference between overloading and
overriding. Overloaded functions (or operators) take different
arguments, but they are in the same class or namespace. However,
virtual functions need to be overridden, which means they have to take
the same arguments in the derived class as in the base class. If you
truly overload a virtual function or operator by providing different
arguments, you will likely end up hiding the base class virtual
function or operator.

--
Bob Hairgrove
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
overloading operator->*() and operator->() gob00st@googlemail.com C++ 2 02-21-2009 04:26 AM
overloading operator->*() and operator->() gob00st@googlemail.com C++ 11 02-20-2009 08:52 PM
static funtions hula Java 4 01-17-2007 12:34 PM
Overloading funtions with const qualifier matthias_k C++ 13 01-26-2005 06:51 AM
How to create global Funtions & Routines Matthew Hood ASP .Net 2 06-25-2003 12:56 PM



Advertisments