version 1.74, 2003/03/12 21:02:53
|
version 1.75, 2003/07/14 13:55:35
|
|
|
<pre> | <pre> |
String test = "abc"; | String test = "abc"; |
printf("test = %s\n", (const char*)test.getCString()); | printf("test = %s\n", (const char*)test.getCString()); |
|
|
|
NOTE: Do not do the following: |
|
const char * p = (const char *)test.getCString(); |
|
The pointer p will be invalid. This is because |
|
the CString object is destructed, which deletes |
|
the heap space for p. |
</pre> | </pre> |
*/ | */ |
CString getCString() const; | CString getCString() const; |