Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I convert a CString to char ?

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

How can I convert a CString to char ?

I have a editbox (m_editbox CString) to receive a data for exemple "ABC123". I would like to put this data into a array. But the array accept only char.

ex.:

UpdateData(TRUE);
char tc[] = m_editbox;

Is it correct ?

Best regards

 
Here is an easier way to do it using casts:

(LPSTR)(LPCSTR)Your_CString_Goes_here

Take care!
 
hi
I want to run my c++ progam under the web? is it possible
if possible
how?
and if not possible
How to convert c++ to visual c?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top