⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_28353.htm

📁 vc
💻 HTM
字号:
<p>
序号:28353 发表者:tudou 发表日期:2003-01-20 17:06:26
<br>主题:大家帮我找找错误
<br>内容:int index=0;<BR>for(i=0;dlg.m_BfPath[i]!='\0';i++)<BR>{<BR>szDes[index++]=dlg.m_BfPath.GetAt(i);<BR>if((dlg.m_BfPath.GetAt(i))=='\') szDes[index-1]='\\';<BR>}<BR>szDes[index]='\0';<BR><BR>其中dlg.m_BfPath是CString<BR>szDes是char数组
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:tudou 回复日期:2003-01-20 17:11:32
<br>内容:在if语句出现以下<BR>错误提示<BR>error C2015: too many characters in constant<BR>error C2017: illegal escape sequence<BR>error C2017: illegal escape sequence<BR>error C2001: newline in constant<BR>error C2143: syntax error : missing ')' before 'constant'<BR>error C2143: syntax error : missing ';' before '}'<BR>Error executing cl.exe.<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>
<font color=red>答案被接受</font><br>回复者:我本大梦人 回复日期:2003-01-20 17:21:03
<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>
回复者:tudou 回复日期:2003-01-20 18:43:24
<br>内容:试成了<BR>但是我还不很明白<BR>dlg.m_BfPath是我从树状控件的到的目标路陉<BR>显示时是'\'<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-20 18:55:22
<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>
回复者:tudou 回复日期:2003-01-20 19:31:40
<br>内容:C++我没学<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-20 19:54:18
<br>内容:呵呵,这也不仅仅是C++的用法。<BR><BR>使用字符串时,有时要用特殊字符,例如跳格、回车等等。C定义了几个转义字符(即在字符前使用反斜杠"\"),使得字符串(例如printf要输出的字符)中可以容易地包含进特殊字符。下面列出了能在字符串中使用的转义字符:<BR><BR>\a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//ASCII bell<BR>\b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//退格<BR>\f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//走纸换页<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//换行符<BR>\r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//软回车(不换行)<BR>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//横向跳格<BR>\v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//竖向跳格<BR>\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//反斜杠字符"\"<BR>\'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//单引号字符<BR>\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//双引号字符<BR>\?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//问号<BR>\nnn&nbsp;&nbsp;&nbsp;&nbsp;//八进制ASCII码值<BR>\xnnn&nbsp;&nbsp; //十六进制ASCII码值
<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-20 19:55:04
<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 + -