This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Hi bugmakers
- To: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Subject: Re: Hi bugmakers
- From: "Vadim V. Osikov" <osa at klo dot re dot com dot ua>
- Date: Tue, 21 Feb 1995 08:03:35 +0200 (UKR)
- cc: egcs-bugs at cygnus dot com
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.