Use the overloaded subscript ([]) operator to retireve a single character specified by the zero-based index in nIndex. This operator is a convenient substitute for the GetAt member function.
Important You can use the subscript ([]) operator to get the value of a character in a CString, but you cannot use it to change the value of a character in a CString.
TCHAR operator []( int nIndex ) const;
| Header File | Afx.h |
| Platforms | |
| Versions | 1.0 and later |
| Complete documentation | Visual C++ documentation |
CString Overview, CString Operators, Simple Value Types, CString::GetAt, CString::SetAt