📄 subject_27802.htm
字号:
<p>
序号:27802 发表者:夏乾坤 发表日期:2003-01-15 13:39:05
<br>主题:类型问题
<br>内容:int len;<BR>CString tmp = "aaaaaaaa";<BR>len = tmp.GetLength;<BR><BR><BR>为什么会出现这个类型转换错误? GetLength返回的是啥?<BR>cannot convert from 'int (__thiscall CString::*)(void) const' to 'int'
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:songxinye 回复日期:2003-01-15 13:42:25
<br>内容:len = tmp.GetLength();<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:晚风也渡 回复日期:2003-01-15 14:14:18
<br>内容:你写错了,看MSDN上的解释<BR><BR>int GetLength( ) const;<BR><BR>Return Value<BR><BR>A count of the bytes in the string.<BR><BR>Remarks<BR><BR>Call this member function to get a count of the bytes in this CString object. The count does not include a null terminator.<BR><BR>For multibyte character sets (MBCS), GetLength counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes.<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -