Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » String to int
Re: String to int [message #27597 is a reply to message #27590] |
Sun, 25 July 2010 12:20 |
|
morley wrote on Sun, 25 July 2010 07:54 | Thanks for the help! It is interesting that the StrInt(char *) works with both c-character strings and the Upp String type.
|
You're welcome
The magic converting char* to String is one of the C++ features that make programmers life a bit easier. If there is a conversion operator defined, it is used automatically. For the String->const char * there is "operator const char *() const" defined in String (actually in String0, but that is implementation detail). For the other way, const char*->String, C++ just uses the constructor String(const char *s) to convert the type.
Honza
|
|
|
Goto Forum:
Current Time: Wed May 15 07:25:31 CEST 2024
Total time taken to generate the page: 0.01904 seconds
|