请教CString的Format问题
各位大神们:
我在网上查到的
CString str = "Some Data";
str.Format("%s%d", str, 123); //Attention: str is also used in the parameter list.
这样写可能会导致buffer too small的问题
现在有以下问题:
(1)以下句子会导致buffer too small的问题吗:
DWORD ret = GetPrivateProfileString( "PARA", "train", "", testString.GetBuffer(MAX_PATH), MAX_PATH ,"E:\\test.ini");
testString.Format("%s",testString.GetBuffer());
(2)
“f:\dd\vctools\crt_bld\self_x86\crt\src\vsprintf.c Line:244”
Expression:("Buffer too small", 0).
这个问题是针对format的报错吗?还是其他问题也会导致这个错误?我在网上查到的其他串处理如果出错也会报buffer too small,但是位置不在Line:244