🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13861

Re: std::auto_ptr<> Help Please, Part 2

#13861
From: dcent
Date: Sun, 14 Sep 2003 03:43
23 lines
1691 bytes
Thanks again to all for the help. I have another question about that 
nasty auto_ptr<> though. How can I pass what the auto_ptr is holding 
into a function?

MyFile.h
---------
private:
   void _fastcall LoadList(TStringList *sl);	//or should it be 
(TStringList &sl)

MyFile.cpp
---------
_fastcall TForm::Button1Click() {
    std::auto_ptr<TStringList> sl(new TStringList(this));
    LoadList(sl);		//<-- throws an error
}

The error is something like:
    Cannot convert auto_ptr<TStringList> to TStringList *

Anyone got an idea?

Thanks dcent
Technical Details
Message-ID: <3F63E3D7.7050506@NetScape.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3F5E64B4.4050201@NetScape.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,da48c8ace4f19025
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-13 20:49:57 PST
Message-ID: <3F63E3D7.7050506@NetScape.net>
Date: Sat, 13 Sep 2003 22:43:19 -0500
From: dcent <DcentJ8@NetScape.net>
Reply-To:  DcentJ8@NetScape.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: std::auto_ptr<> Help Please, Part 2
References: <3F5E64B4.4050201@NetScape.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.61.78.99
X-Trace: newsgroups.borland.com 1063511000 208.61.78.99 (13 Sep 2003 20:43:20 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail