Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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.
 
 
                                     -♦-