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:13:55 EDT (-0400)
  Re: A question about Java generics (not a flame)  
From: Warp
Date: 15 May 2008 08:45:40
Message: <482c3074@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> *** A.h

> void X<T>(void);

> class A {
>    void xx(long i) {
>      cout << "Alpha!\n";
>    }
> }

> #include <A.h>

> void A::xx(int i) {
>    cout << "Beta!\n";
> }

  You are trying to implement a function void A::xx(int) which hasn't
been declared in the class A declaration. It won't compile.

  Note that void A::xx(long) and void A::xx(int) are two different functions,
with different fingerprints. You cannot override one with the other.

-- 
                                                          - Warp


Post a reply to this message

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