很抱歉让每个人都讨厌,但这给我带来了一些痛苦.这是代码:
char buf[500];
sprintf(buf,"D:\\Important\\Calibration\\Results\\model_%i.xml",mEstimatingModelID);
Run Code Online (Sandbox Code Playgroud)
mEstimatingModelID是一个整数,当前保持值为0.
很简单,但调试显示这种情况正在发生:
0x0795f630 "n\Results\model_0.xml"
Run Code Online (Sandbox Code Playgroud)
即它缺少字符串的开头.
有任何想法吗?这很简单,但我无法弄清楚.
谢谢!