Discussion:
wxWiki: wxZipInputStream Documentation update
Atti Szuts
2014-09-15 13:02:44 UTC
Permalink
I'd like to read zip archive format in my app, and found this helpful code:

http://wiki.wxwidgets.org/WxZipInputStream

My only problem was: in what header file is *std::auto_ptr* defined?
Example code states:

*#include <memory.h>*

But in my Linux I have to use:
*#include <memory>*

This file is under */usr/include/c++/4.6/*


Is this include format cross-platform "safe"?


thanks
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-09-15 15:56:14 UTC
Permalink
On Mon, 15 Sep 2014 06:02:44 -0700 (PDT) Atti Szuts wrote:

AS> I'd like to read zip archive format in my app, and found this helpful code:
AS>
AS> http://wiki.wxwidgets.org/WxZipInputStream
AS>
AS> My only problem was: in what header file is *std::auto_ptr* defined?
AS> Example code states:
AS>
AS> *#include <memory.h>*
AS>
AS> But in my Linux I have to use:
AS> *#include <memory>*
AS>
AS> This file is under */usr/include/c++/4.6/*
AS>
AS>
AS> Is this include format cross-platform "safe"?

<memory> is the correct header to include for std::auto_ptr<> declaration,
yes. Please correct the wiki example to include it if it uses auto_ptr.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Szuts Attila
2014-09-15 17:01:45 UTC
Permalink
Thanks Vadim, I updated the wiki page.

A.
Post by Vadim Zeitlin
AS>
AS> http://wiki.wxwidgets.org/WxZipInputStream
AS>
AS> My only problem was: in what header file is *std::auto_ptr* defined?
AS>
AS> *#include <memory.h>*
AS>
AS> *#include <memory>*
AS>
AS> This file is under */usr/include/c++/4.6/*
AS>
AS>
AS> Is this include format cross-platform "safe"?
<memory> is the correct header to include for std::auto_ptr<> declaration,
yes. Please correct the wiki example to include it if it uses auto_ptr.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
petah
2014-09-15 18:42:37 UTC
Permalink
On Mon, 15 Sep 2014 06:02:44 -0700 (PDT)
Post by Atti Szuts
http://wiki.wxwidgets.org/WxZipInputStream
My only problem was: in what header file is *std::auto_ptr* defined?
(...)
Is this include format cross-platform "safe"?
"Why deprecate auto_ptr?" (2005)
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.4.5%20-%20Class%20template%20auto_ptr

Scott Meyers' "Update on auto_ptr" (2007)
http://www.aristeia.com/BookErrata/auto_ptr-update.html

cheers,

-- p
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...