If you don't need to modify the char array, you can simply cast a CString to an LPCTSTR (long? pointer const TCHAR string):
LPCTSTR apszBuffer = (LPCTSTR)m_MyCstring;
If you need to modify the buffer, you need to use GetBuffer and ReleaseBuffer:
LPTSTR apszMyBuffer = m_MyCString.GetBuffer(m_MyCString.GetLength());
// Do something with apszMyBuffer, changing its length to 25
m_MyCString.ReleaseBuffer(25);
Use atoi, atof (or _ttoi for wide-char compatibility):
int viValue = atoi("25478");
float vfValue = atof("123.456");
Use CString::Mid():
CString vstrBit = m_MyCString.Mid(0, 2); // First two chars
CString vstrAnother = m_MyCString.Mid(5, 4); // Chars 5-8
Hope this helps. ------------------------ Derek Waters derek@lj-oz.com