急求C++程序解释

来源:百度知道 编辑:UC知道 时间:2024/06/24 09:28:50
CString str11;
str11.Format("VE0.2\rDI%d\r%dFL\r", tmpData, index);
是什么意思啊

就是把tmpData和index变量的数值填进格式串中,分别对应%d的位置,生成str11字符串.

格式化字符串
让str11等于
"VE0.2" + 回车 + "DI" + tmpData的值 + 回车 + index的值 + "FL" + 回车