Article View: pl.comp.lang.c
Article #309681Dziedziczcenie i metody
From: radoslaw
Date: Thu, 07 Jun 2018 09:02
Date: Thu, 07 Jun 2018 09:02
17 lines
1747 bytes
1747 bytes
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.
Technical Details
Message-ID:
<342f89bb-b3d4-4c87-9dd7-97a572d63ab0@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h2-v6no3074000qtp.0!news-out.google.com!p41-v6ni570qtp.1!nntp.google.com!h2-v6no3073996qtp.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Received: by 2002:a0c:93ca:: with SMTP id g10-v6mr487474qvg.30.1528362175038; Thu, 07 Jun 2018 02:02:55 -0700 (PDT) X-Received: by 2002:a81:9b0f:: with SMTP id s15-v6mr41657ywg.11.1528362174776; Thu, 07 Jun 2018 02:02:54 -0700 (PDT) Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h2-v6no3074000qtp.0!news-out.google.com!p41-v6ni570qtp.1!nntp.google.com!h2-v6no3073996qtp.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: pl.comp.lang.c Date: Thu, 7 Jun 2018 02:02:54 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.174.26.203; posting-account=XENjyAkAAACMiwFCilkQ6IR7gD6eX5mJ NNTP-Posting-Host: 93.174.26.203 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <342f89bb-b3d4-4c87-9dd7-97a572d63ab0@googlegroups.com> Subject: Dziedziczcenie i metody From: radoslaw@korzeniewski.net Injection-Date: Thu, 07 Jun 2018 09:02:54 +0000 Lines: 18 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit