POV-Ray : Newsgroups : povray.off-topic : A question about Java generics (not a flame) : Re: A question about Java generics (not a flame) Server Time
7 Sep 2024 21:15:41 EDT (-0400)
  Re: A question about Java generics (not a flame)  
From: Darren New
Date: 14 May 2008 16:52:33
Message: <482b5111$1@news.povray.org>
Fredrik Eriksson wrote:
> On Wed, 14 May 2008 18:23:54 +0200, Darren New <dne### [at] sanrrcom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.