[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: Re: Hi bugmakers
From: "Vadim V. Osikov" <osa () klo ! re ! com ! ua>
Date: 1995-02-21 6:03:35
[Download RAW message or body]
it was next sample:
class A {
public :
virtual int func ( int, int ) ;
virtual int func ( int ) ;
} ;
class B : public A {
public :
int func ( int ) ;
} ;
main () {
B b ;
b.func ( 0, 0 ) ;
}
> Ok, I compile this with egcs-2.93.08, and get
>
> a.cc:14: no matching function for call to `B::func (int, int)'
> a.cc:9: candidates are: B::func(int)
>
> Looking at code, I see that the compiler is right, and your code is
> wrong. Now what, bugmaker?
There is something wrong in my code ?
Base class has two virtual functions with diffrent parametrs, and
in overloading on of them, i lost second.... is it ok ?
class A {
public :
int a ( int ) ;
} ;
class B {
public :
} ;
main () {
B b ;
b.a() ;
}
There is no function B::a(int) but compiler did`nt say it. :)
And correct me if me wrong: you have no diffrence between func(int) and
func(int,int) in overloading ?
Thanks for answer. I`ll be waiting.
Best regards.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic