| | |
AnsiString to Const Char*
![]() |
I've got
AnsiString foo;
How do I pass this to a function which needs a char?
(eg., strcpy, etc).
Answer:
foo->c_str().
The c_str() method of the AnsiString class returns
a const char* which can be used to read, but not
modify, the underlying string.
AnsiString foo;
How do I pass this to a function which needs a char?
(eg., strcpy, etc).
Answer:
foo->c_str().
The c_str() method of the AnsiString class returns
a const char* which can be used to read, but not
modify, the underlying string.
Real Eyes Realize Real Lies
My Resume
My Resume
•
•
Join Date: Jul 2004
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by meabed
I've got
AnsiString foo;
How do I pass this to a function which needs a char?
(eg., strcpy, etc).
Answer:
foo->c_str().
The c_str() method of the AnsiString class returns
a const char* which can be used to read, but not
modify, the underlying string.
![]() |
Similar Threads
- Cannot convert 'AnsiString' to 'const char *' (C++)
- How to convert string to const char* in C (C++)
- Converting Int to Const Char (C)
- Problems casting a const char* to char* (C++)
Other Threads in the C Forum
- Previous Thread: chars and floats
- Next Thread: Counter issues
| Thread Tools | Search this Thread |
#include adobe api array asterisks binarysearch calculate char cm copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fflush fgets file fork forloop frequency getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest homework i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling segmentationfault sequential shape socket socketprograming stack standard string systemcall threads turboc unix user voidmain() wab win32api windows.h





