释义 |
CString::operator []
TCHAR operator []( int nIndex ) const;
参数: 说明: 你可以将一个CString对象看作是一个字符数组。此重载下标操作符([])返回由nIndex中的从零开始的索引值指定的一个字符。此操作符是GetAt成员函数的惯用的代用符。
示例: 下面的例子说明了如何使用CString::operator []操作符。 // CString::operator []示例: CString s( "abc" ); ASSERT( s[1] == 'b' );
请参阅:CString::GetAt, CString::SetAt |