Sorry for this off-topic about c++ and c

Me& gcc-gnu@opbit.com
Fri Mar 8 01:21:00 GMT 2002


Hey,

>I'm using gcc and gcc-c++ on redhat 7.2. Is there any way to convert a
>string (declared with string s;) to a char*?

use s.c_str()

that returns a const char* .

Elm



More information about the Gcc-help mailing list