Guest_imported
New member
- Jan 1, 1970
- 0
hi..
i have some doubts in operator overloading... plz help me out.
I'm having a BaseClass and DerivedClass which is deriving publicly.
Now i'm having overloaded operator methods in class BaseClass which includes ( + , - , * , / , == )
Ive also overloaded the '=' operator which takes a const int as argument!
Now in the application when i try to assign an int to the Derived Object, the compiler gives me an error saying that no overload match is found! ...
but the overloading of '=' works fine when i define it at the DerivedClass level...
Can anyone explain it to me why is it so...
I use aCC compiler under HP-UX..
thanx in advance...
c ya
Shine
i have some doubts in operator overloading... plz help me out.
I'm having a BaseClass and DerivedClass which is deriving publicly.
Now i'm having overloaded operator methods in class BaseClass which includes ( + , - , * , / , == )
Ive also overloaded the '=' operator which takes a const int as argument!
Now in the application when i try to assign an int to the Derived Object, the compiler gives me an error saying that no overload match is found! ...
but the overloading of '=' works fine when i define it at the DerivedClass level...
Can anyone explain it to me why is it so...
I use aCC compiler under HP-UX..
thanx in advance...
c ya
Shine