Article View: pl.comp.lang.c
Article #309654Re: Destructor a funkcja wirtualna
From: Sebastian Biały
Date: Thu, 15 Mar 2018 19:55
Date: Thu, 15 Mar 2018 19:55
11 lines
1329 bytes
1329 bytes
On 3/15/2018 7:41 PM, Borneq wrote:
> Mam klasę abstrakcyjną Node i metodę wirtualną toString()
> chcę podczas kasowania obiektów wypisywać nazwę tego obiektu:
> virtual ~Node()
> {
> printf("delete %s\n",toString().c_str());
> }
Typ obiektu podczas konstrukcji i destrukcji zawiera inną tablicę
wirtualną niż po konstrukcji i przed destrukcją. Innymi słowy za
wcześnie albo za późno.
Technical Details
Message-ID:
<p8ej3h$36v$2@node2.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-mailReferences:
<p8eep1$7an$1@node1.news.atman.pl>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: Sebastian Biały <heby@poczta.onet.pl> Newsgroups: pl.comp.lang.c Subject: Re: Destructor a funkcja wirtualna Date: Thu, 15 Mar 2018 20:55:14 +0100 Organization: ATMAN - ATM S.A. Lines: 11 Message-ID: <p8ej3h$36v$2@node2.news.atman.pl> References: <p8eep1$7an$1@node1.news.atman.pl> NNTP-Posting-Host: 176.115.86.185 Mime-Version: 1.0 X-Trace: node2.news.atman.pl 1521143729 3295 176.115.86.185 (15 Mar 2018 19:55:29 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Thu, 15 Mar 2018 19:55:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <p8eep1$7an$1@node1.news.atman.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit