🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309684

Re: Dziedziczcenie i metody

#309684
From: Borneq
Date: Thu, 07 Jun 2018 13:16
22 lines
1596 bytes
W dniu 07.06.2018 o 11:02, radoslaw@korzeniewski.net pisze:
> Witam,
> 
> Mam klasę bazową A:
> class A {
>    bool send() { return send(0); };
>    virtual bool send(int flags);
> }
> oraz klasę pochodną B:
> class B: public A {
>    bool send(int flags);
> }
> chciałbym teraz móc skorzystać z B.send() ale kompilator wywala:
> error: no matching function for call to ‘B::send()’
>    b.send();
>               ^
> note: candidate: virtual bool B::send(int)
> obejście w postaci zdefiniowania B::send() jakoś mi nie pasuje. Przyjmę wszelaką krytykę i pomoc, także query do google.
> 
Send z B przykrywa wirtualną, trzeba
b.A::send();
- sprawdzone na VStudio
Technical Details
Message-ID: <pfbb7c$9cm$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <342f89bb-b3d4-4c87-9dd7-97a572d63ab0@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Borneq <borneq@antyspam.hidden.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: Dziedziczcenie i metody
Date: Thu, 7 Jun 2018 15:16:29 +0200
Organization: ATMAN - ATM S.A.
Lines: 22
Message-ID: <pfbb7c$9cm$1@node1.news.atman.pl>
References: <342f89bb-b3d4-4c87-9dd7-97a572d63ab0@googlegroups.com>
NNTP-Posting-Host: public-gprs362468.centertel.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1528377388 9622 37.47.47.37 (7 Jun 2018 13:16:28 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 7 Jun 2018 13:16:28 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
In-Reply-To: <342f89bb-b3d4-4c87-9dd7-97a572d63ab0@googlegroups.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit