------- Comment #3 from gray_song at yahoo dot com  2007-12-04 23:40 -------
(In reply to comment #2)
> The error is correct.  The count without any arguments hide the one with (the
> other way is true too).  You need to add using A::count in the class C and
> using C::count in class D.
> 
Change the function C::count(int l) to following as suggested:
 long long count(int l) {
       return A::count();
   }

The compiler complains:

hello.cpp: In function 'int main(char**)':
hello.cpp:31: error: no matching function for call to 'D::count(int)'
hello.cpp:21: note: candidates are: virtual long long int D::count()

Is there anyone around it?


-- 

gray_song at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34338

Reply via email to