作业帮 > 综合 > 作业

mfc 中CString类中的Format(_T("%d,%f,%ld,%lf,%c,%s"),函数表示什么?怎么使用?

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/07 16:01:38
mfc 中CString类中的Format(_T("%d,%f,%ld,%lf,%c,%s"),函数表示什么?怎么使用?
因为我学的是c++ 对于c中的printf函数不了解!
int a = 123;
float b = 45.6;
char c = 'h';
CString d = "xyz";
CString str = "";
str.Format("%d,%f,%ld,%lf,%c,%s",a,b,a,b,c,d);
this->MessageBox(str);
输出为:123,45.599998,123,45.599998,h,xyz