🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #8678

Re: [C++]: copy constructor en LIFO lijst

#8678
From: Andy Georges
Date: Tue, 11 Jun 2002 13:14
26 lines
1925 bytes
Hello,

>> Stack::Stack(Stack &st) {
>>         Element *temp = st._start; // 1e element orig. lijst
>>         Element *e    = new Element(&temp); // netjes construeren
> 
> Ik veronderstel dat dit Element(*temp) moet zijn. En dan wordt ook
> direct duidelijk dat er iets mis moet gaan indien st._start == 0!

Nope, ik veronderstel dat er iets bestaat als

Element::Element(Element& e) { /* ... */ }

ok, de st._start == 0 had ik niet voorzien, maar dat is een eenvoudige test 
ertussen vlammen. all apologies.

Andy

-- 
--
==========================================================================
Parallel Information Systems Group - Dept. ELIS - Ghent University
St. Pietersnieuwstraat 41, 9000 Ghent, Belgium
Phone: +32-9-264.33.67,   Fax: +32-9-264.35.94
E-mail: andy.georges@elis.rug.ac.be 
==========================================================================
Technical Details
Message-ID: <ae4t2v$3up6v$2@ID-141095.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!supernews.com!feed.textport.net!diablo.netcom.net.uk!netcom.net.uk!newsfeed.online.be!fu-berlin.de!uni-berlin.de!escher.elis.rug.ac.BE!not-for-mail
References: <B92ACD30.664E%christof_laeremans@hotmail.com> <ae497n$3rgcp$1@ID-141095.news.dfncis.de> <gvl4ea.b0c.ln@ns1.irule.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,d9871be4e7eaae5e
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-06-11 06:14:10 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!supernews.com!feed.textport.net!diablo.netcom.net.uk!netcom.net.uk!newsfeed.online.be!fu-berlin.de!uni-berlin.de!escher.elis.rug.ac.BE!not-for-mail
From: Andy Georges <andy.georges@elis.rug.ac.be>
Newsgroups: be.comp.programming
Subject: Re: [C++]: copy constructor en LIFO lijst
Date: Tue, 11 Jun 2002 15:14:07 +0200
Organization: RUG - ELIS
Lines: 26
Message-ID: <ae4t2v$3up6v$2@ID-141095.news.dfncis.de>
References: <B92ACD30.664E%christof_laeremans@hotmail.com> <ae497n$3rgcp$1@ID-141095.news.dfncis.de> <gvl4ea.b0c.ln@ns1.irule.be>
NNTP-Posting-Host: escher.elis.rug.ac.be (157.193.67.99)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: fu-berlin.de 1023801247 4154591 157.193.67.99 (16 [141095])
User-Agent: KNode/0.7.1