Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert AnsiString to char* ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can i convert an AnsiString to char* ?

AnsiString has got no methods to convert.
I tried with typecast, and that didn't work either.

Then i wanted to write a function which could do that, but AnsiString[position] didn't work either.

So please, if anyone can help me, write back.

thx, Mad_Max
 
It's very simple:

String str;

char text[nn]

str="12345";
strcpy(text,str.c_str());
_________________________________________

The function c_str() does the conversion.
hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top