Board index » cppbuilder » AnsiString not compatible with basic_string
Mauro
![]() CBuilder Developer |
Mauro
![]() CBuilder Developer |
AnsiString not compatible with basic_string2003-11-19 02:15:56 PM cppbuilder109 Hi all, when I have a component with a caption and want fill it with a std::string I have to use the c_str() function: string text; text = "Button"; Button1->Caption = text.c_str(); This is not fine, because the string is converted to a char* and then converted again to an AnsiString... Is there a better possibility ?? Thanks Mauro |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2003-11-19 03:35:47 PM
Re:AnsiString not compatible with basic_string
"Mauro" < XXXX@XXXXX.COM >wrote in message
QuoteThis is not fine Quotethe string is converted to a char* buffer. The same is true of AnsiString's c_str() method as well. Quoteand then converted again to an AnsiString... QuoteIs there a better possibility ?? the only commonality they have with each other, since they both support char* pointers. Gambit |