This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug
- To: wieland dot kroetz at arcormail dot de
- Subject: Re: bug
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Tue, 29 Feb 2000 22:40:21 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <38BC1517.28AF590E@arcormail.de>
> and produces the wrong output:
Thanks for your bug report. This is not a bug in gcc, but in your
code. The data() function does not return a zero-terminated string;
you need to use the c_str() function for that. If you replace all
data() calls with c_str() your code works fine. Please read a C++ book
for details.
Regards,
Martin