Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I want to move move a characters from Cstring variable to array one by one...Anybody know ?
Posted
Updated 2-Jan-14 1:41am
v2

Not sure why you would want to do it one-by-one (versus multiple at a time), but the CString::GetAt[^] method allows you to get to the characters one at a time.

CString::GetBuffer[^] would allow you to get the pointer to the internal array and therefore be able to copy any amount of data off of it quickly using memcpy() or anything similar. Just remember to free up the buffer afterward by calling CString::ReleaseBuffer[^].
 
Share this answer
 
Google[^] knows.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900