CString str = "Hello"; str.Delete(2); // Deletes the character at position 2 (l) // str now contains "Helo"
CString str = "Goodbye"; str.Delete(2, 3); // Deletes 3 characters starting from position 2 (odb) // str now contains "Gbye"
CString str = "Hello"; str.Delete(0, str.GetLength()); // Deletes all characters // str is now an empty string ""The CString Delete function is a part of the MFC (Microsoft Foundation Class) library.