S
Stephen Alpert
I've moved an ATL project (that uses STL) from VC6 to VC7. Of course, it won't
compile. In particular, the line
char *res = (char *)malloc( n );
ostrstream pout = ostrstream( res, n ); <<-- error here
now generates an error:
error C2558: class 'std:strstream' : no copy constructor available or copy
constructor is declared 'explicit'
The relevant definition from <strstream> is:
....
_CRTIMP2 ostrstream(char *, streamsize,
ios_base:penmode =
ios_base:ut); // construct with static array
How do I fix this? Do I have to extend ostrstream and add my own constructor?
Am I misreading the error message?
/steveA
Steve Alpert
my email (e-mail address removed) is encrypted with ROT13 (www.rot13.org)
-------------------------------------------
NOTICE OF CONFIDENTIALITY
-------------------------------------------
The information in this email, including attachments, may be confidential
and/or privileged and may contain confidential health information. This
email is intended to be reviewed only by the individual or organization
named as addressee. If you have received this email in error please
notify IDX immediately--by return message to the sender or to
(e-mail address removed)--and destroy all copies of this message and any
attachments. Please note that any views or opinions presented in this
email are solely those of the author and do not necessarily represent
those of IDX. Confidential health information is protected by state and
federal law, including, but not limited to, the Health Insurance
Portability and Accountability Act of 1996 and related regulations.
compile. In particular, the line
char *res = (char *)malloc( n );
ostrstream pout = ostrstream( res, n ); <<-- error here
now generates an error:
error C2558: class 'std:strstream' : no copy constructor available or copy
constructor is declared 'explicit'
The relevant definition from <strstream> is:
....
_CRTIMP2 ostrstream(char *, streamsize,
ios_base:penmode =
ios_base:ut); // construct with static array
How do I fix this? Do I have to extend ostrstream and add my own constructor?
Am I misreading the error message?
/steveA
Steve Alpert
my email (e-mail address removed) is encrypted with ROT13 (www.rot13.org)
-------------------------------------------
NOTICE OF CONFIDENTIALITY
-------------------------------------------
The information in this email, including attachments, may be confidential
and/or privileged and may contain confidential health information. This
email is intended to be reviewed only by the individual or organization
named as addressee. If you have received this email in error please
notify IDX immediately--by return message to the sender or to
(e-mail address removed)--and destroy all copies of this message and any
attachments. Please note that any views or opinions presented in this
email are solely those of the author and do not necessarily represent
those of IDX. Confidential health information is protected by state and
federal law, including, but not limited to, the Health Insurance
Portability and Accountability Act of 1996 and related regulations.