VC str.Format 错误 Buffer too small
2013-05-23 00:00
309 查看
CString output ; int size = m_NicInfo.size(); output.Format(_T("共%d块网卡\r\n"),size); //VE_NicINFO_IT it = this->m_NicInfo.begin(); //for(; it != m_NicInfo.end(); ++it){ // CString tmp; // tmp.Format(_T("网卡GUID:%s\r\n"),it->NicGUID); // output += tmp; // tmp.Format(_T("网卡描述:%s\r\n"),it->NicDesc); // output += tmp; // tmp.Format(_T("网卡名称:%s\r\n"),it->NicName); // output += tmp; // tmp.Format(_T("网卡注册表中INDEX:%s\r\n"),it->NicClassIndex); // output += tmp; //} for(int pos = 0; pos < size ; pos++){ CString tmp; tmp.Format(_T("网卡GUID:%s\r\n"),m_NicInfo.at(pos).NicGUID); output += tmp; tmp.Format(_T("网卡描述:%s\r\n"),m_NicInfo.at(pos).NicDesc); output += tmp; tmp.Format(_T("网卡名称:%s\r\n"),m_NicInfo.at(pos).NicName); output += tmp; tmp.Format(_T("网卡注册表中INDEX:%s\r\n"),m_NicInfo.at(pos).NicClassIndex); output += tmp; } writeLog(output);
str.Format 错误 Buffer too small
The call will fail if the string object itself is offered as a parameter to Format. For example, the following code will cause unpredictable results:
CAtlString str = _T("Some Data"); str.Format(_T("%s%d"), str, 123); // Attention: str is also used in the parameter list.
相关文章推荐
- str.Format 错误 Buffer too small
- VC程序提示 Expression:("Buffer too small",0) 错误
- VC程序提示 Expression:("Buffer too small",0) 错误
- CFileDialog打开多个文件失败 返回错误 FNERR_BUFFERTOOSMALL
- CFileDialog打开多个文件失败 返回错误 FNERR_BUFFERTOOSMALL
- CString.Format调用失败另一例(buffer too small vsprintf.c Line:244)
- PHP调用Oracle存储过程时的错误:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- 在运行ocrconfig replace ocrmirror命令时出现PROT-22: Storage too small错误
- 古怪错误:Your display is too small to run Menuconfig!
- xsql---Buffer too small for record data
- make menuconfig显示错误“Your display is too small to run Menuconfig!”
- Buffer is too small
- make menuconfig显示错误“Your display is too small to run Menuconfig!”
- TypeError: buffer is too small for requested array python 问题处理
- Apple Mach-O (Id) Error ios编译错误(file too small file)
- C语言-L Buffer is too small && 0 解决方法
- ORACLE 函数处理的数据返回值过长 character string buffer too small , WMSYS.WM_CONCAT
- openwrt编译命令make menuconfig显示错误“Your display is too small to run Menuconfig!”
- python3中split分割字符串出现错误 TypeError‘str’ does not support the buffer interface
- strcpy_s Buffer is too small 出错根本原因