Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
CString::operator const char* ()
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  operator const char* () const;
 
  Remarks
 
  This useful casting operator provides an efficient method to access the
  null-terminated C string contained in a CString object. No characters
  are copied; only a pointer is returned.
 
  Be careful with this operator. If you change a CString object after you
  have obtained the character pointer, you may cause a reallocation of
  memory that invalidates the pointer.
 
  Return Value
 
  A character pointer if the cast was successful; otherwise a null
  pointer.
 
 
                                     -♦-