CSimpleStringT::operator []
Call this function to access a single character of the character array.
XCHAR operator[](
int iChar
) const;
Параметры
- iChar
Zero-based index of a character in the string.
Заметки
The overloaded subscript ([]) operator returns a single character specified by the zero-based index in iChar. This operator is a convenient substitute for the GetAt member function.
![]() |
---|
You can use the subscript ([]) operator to get the value of a character in a CSimpleStringT, but you cannot use it to change the value of a character in a CSimpleStringT. |
Пример
The following example demonstrates the use of CSimpleStringT::operator [].
CSimpleString s(_T("abc"), pMgr);
ASSERT(s[1] == _T('b'));
Требования
Header: atlsimpstr.h