|
![](/i/fill.gif) |
Fredrik Eriksson wrote:
> On Wed, 14 May 2008 18:23:54 +0200, Darren New <dne### [at] san rr com> wrote:
>>
>> *** Main2.cpp
>>
>> #include <A.h>
>>
>> void A::xx(int i) {
>> cout << "Beta!\n";
>> }
>
> This will fail to compile, because you cannot redefine A::xx.
I didn't. I created an overloaded version. One takes an int, the other
takes a long. Am I *completely* clueless about C++?
My intent was to get one match to do a silent upcast from int to long,
and the other to match the more-appropriate int-accepting function.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
![](/i/fill.gif) |