Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Thu Sep 04 19:38:54 CEST 2025

Total time taken to generate the page: 0.04334 seconds