how to converter String* to char?

  • Thread starter Thread starter CIAO
  • Start date Start date
C

CIAO

i have a textbox named myTextBox, i want to converter the
myTextBox->text in char (of standard c++) how?
inside char *myString[255];

tnx at all.
 
You'll most likely have to loop through each of the characters in the string
and add them to your char*.

char myString[255];
for (int x=0; x<myTextBox->Text->Length; x++)
myString[x] = static_cast<char>(myTextBox->Text->get_Chars(x));
myString[x] = 0; // Add null character to terminate
 
Back
Top