遇到的问题:
File:f:\rtm\vctools\crt_bld\self_x86\crt\src\vswprint.c
Line:280
Expression:("Buffer too small",0)
For information on how your program can cause an assertion failure seethe Visual C++ documentation on asserts
(Press Retry to debug the application)
从网站搜到的解决方法:
The call will fail if the string object itself is offered as a parameter to Format. For example, the following code:
CString str = "Some Data";str.Format("%d%d", str, 123); //Attention: str is also used in the parameter list.
will cause unpredictable results.
为了避免这种无法预见的问题,最好不要采取将字符串本身作为参数作为Format的参数,可以另外定义一个CString变量:
cstring str,strTmp;
strTmp="asd....";
str.format("%s",strTmp);