Darren New <dne### [at] san rr com> 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
|