Accessing Individual Characters in a CString

本文介绍了如何使用GetAt()和SetAt()方法以及[]操作符来访问CString对象中的单个字符。这些方法提供了类似于C风格字符串中通过索引访问数组元素的方式。

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字符数组下标那样使用[]操作符去访问

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值