﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-不戒庙-最新评论</title><link>http://www.cppblog.com/winlmh/CommentsRSS.aspx</link><description /><language>zh-cn</language><pubDate>Sat, 19 Jul 2008 08:00:42 GMT</pubDate><lastBuildDate>Sat, 19 Jul 2008 08:00:42 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: 求助：CString Format自身的溢出的问题</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56603</link><dc:creator>三不戒大师</dc:creator><author>三不戒大师</author><pubDate>Sat, 19 Jul 2008 08:01:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56603</guid><description><![CDATA[@wxyz<br>谢谢，终于弄明白是怎么回事了<img src ="http://www.cppblog.com/winlmh/aggbug/56603.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">三不戒大师</a> 2008-07-19 16:01 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56603#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56593</link><dc:creator>wxyz</dc:creator><author>wxyz</author><pubDate>Sat, 19 Jul 2008 04:54:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56593</guid><description><![CDATA[CString::Format<br>void Format( LPCTSTR lpszFormat, ... );<br><br>void Format( UINT nFormatID, ... );<br><br>Parameters<br><br>lpszFormat<br><br>A format-control string.<br><br>nFormatID<br><br>The string resource identifier that contains the format-control string. <br><br>Remarks<br><br>Call this member function to write formatted data to a CString in the same way that sprintf formats data into a C-style character array. This function formats and stores a series of characters and values in the CString. Each optional argument (if any) is converted and output according to the corresponding format specification in lpszFormat or from the string resource identified by nFormatID. <br>////!!!!!这地方好像说了.<br>The call will fail if the string object itself is offered as a parameter to Format. For example, the following code:<br><br>CString str = &quot;Some Data&quot;;<br>str.Format(&quot;%s%d&quot;, str, 123);   // Attention: str is also used in the parameter list.<br><br>will cause unpredictable results.<br>////!!!!<br>When you pass a character string as an optional argument, you must cast it explicitly as LPCTSTR. The format has the same form and function as the format argument for the printf function. (For a description of the format and arguments, seeprintf in the Run-Time Library Reference.) A null character is appended to the end of the characters written.<br><br><img src ="http://www.cppblog.com/winlmh/aggbug/56593.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">wxyz</a> 2008-07-19 12:54 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56593#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56589</link><dc:creator>陈梓瀚(vczh)</dc:creator><author>陈梓瀚(vczh)</author><pubDate>Sat, 19 Jul 2008 04:40:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56589</guid><description><![CDATA[CString能隐式转换到LPCTSTR的，这个倒不是问题。难道CString非空的时候，Format就默认『该对象被重新利用，而不是重新构造一个新的CString对象』？<img src ="http://www.cppblog.com/winlmh/aggbug/56589.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">陈梓瀚(vczh)</a> 2008-07-19 12:40 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56589#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题[未登录]</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56583</link><dc:creator>Kevin</dc:creator><author>Kevin</author><pubDate>Sat, 19 Jul 2008 04:16:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56583</guid><description><![CDATA[改一下&quot;title 不是字符串对象&quot; 应为 &quot;title是CString对象&quot;<img src ="http://www.cppblog.com/winlmh/aggbug/56583.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">Kevin</a> 2008-07-19 12:16 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56583#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题[未登录]</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56582</link><dc:creator>Kevin</dc:creator><author>Kevin</author><pubDate>Sat, 19 Jul 2008 04:15:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56582</guid><description><![CDATA[title 不是字符串对象, 而不是char指针, 你应该 (LPCSTR)title 才对, 因为CString重载了LPCSTR, 这样在运行时才能自动转换成char指针, 匹配到 %s<img src ="http://www.cppblog.com/winlmh/aggbug/56582.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">Kevin</a> 2008-07-19 12:15 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56582#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56581</link><dc:creator>三不戒大师</dc:creator><author>三不戒大师</author><pubDate>Sat, 19 Jul 2008 04:06:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56581</guid><description><![CDATA[title值是变量啊，并不是固定值<br><img src ="http://www.cppblog.com/winlmh/aggbug/56581.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">三不戒大师</a> 2008-07-19 12:06 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56581#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 求助：CString Format自身的溢出的问题</title><link>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56580</link><dc:creator>斯卡</dc:creator><author>斯卡</author><pubDate>Sat, 19 Jul 2008 03:35:00 GMT</pubDate><guid>http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56580</guid><description><![CDATA[不明白你的title后为什么要加&quot;<img src ="http://www.cppblog.com/winlmh/aggbug/56580.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/winlmh/" target="_blank">斯卡</a> 2008-07-19 11:35 <a href="http://www.cppblog.com/winlmh/archive/2008/07/19/56576.html#56580#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>