You can access individual characters within a CString object with the GetAt and SetAt member functions. You can also use the array element, or subscript, operator ( [ ] ) instead of GetAt to get individual characters (this is similar to accessing array elements by index, as in standard C-style strings). Index values for CString characters are zero-based.

可以使用GetAt()和SetAt()方法去访问CString对象的单个字符,当然也可以像使用C字符数组下标那样使用[]操作符去访问

更多推荐

Accessing Individual Characters in a CString