On 2/14/07, Paul Herring <[EMAIL PROTECTED]> wrote:

On 2/14/07, Gopi Krishna Komanduri <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>          Thankls for your response. But my query is
> not related to using base class member function. I
> think I didn't keep proper question. My question is
> related to operator overloading. When we over load an
> operator in base class , can that function be used
> with derived class object as we norammly we base class
> functions with derived class objects <=> we inherited
> with public access specifier. Hope I kept the question
> in proper way.

You want to use the base class's function in the derived class's
function which overrides the base function?

If so, yes. That's what I did in the derived::show() function - I
called base::show()

What you cannot do is expect the base class to work with an object
derived from base.

--
PJH
Aio, quantitas magna frumentorum est




i think his doubt his whether he can perform the following operations or
not?

Derived obj1(2,2) , obj2(3,3);

obj1 += obj2;

correct me if i am wrongs


--
Regards
Sumit Chawla ("eNetra : Hail the Invention")


"Computers are useless. They can only give you answers.":Pablo Picasso

Reply via email to