U++ framework
Do not panic. Ask here before giving up.

Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Invalid conversion
Re: Invalid conversion [message #7578 is a reply to message #7577] Sun, 07 January 2007 14:50 Go to previous messageGo to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
Gatling_Gun wrote on Sun, 07 January 2007 13:38

Help me with this code...

char[10] = text1.GetText().ToString();

Ok char to string is an invalid conversion but I try c_str() but don't recognize it!

Please help me! Surprised



"char[10]" seems to be syntactically wrong (unless you use some preprocessor magic). You might try this:

char ten_characters[10];


But why not simply write:

String a_string = text1.GetText();


If "GetText" returns a pointer to an array of chars, this is automatically casted to a String.

Werner
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Chip 8 Emulator
Next Topic: passing X11 mouse events in spawned process
Goto Forum:
  


Current Time: Sat Jul 11 22:44:41 GMT+2 2026

Total time taken to generate the page: 0.00579 seconds