RE: [Dev-C++] what is wrong with the code
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-08-18 01:19:51
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Hossein Haeri > Sent: Monday, August 18, 2003 1:16 AM > To: dev...@li... > Subject: Re: [Dev-C++] what is wrong with the code > > There is, however, a conversion from char* to std::string, and > you may want to suit from it like this: > > string p = &ch; That is guaranteed to be undefined behaviour since there is no terminating '\0' character. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |