C++str.Format

C++应该没有这个函数,说的是Format是在MFC程序里看见的

  Format是CString字符串类的成员函数CString::Format( LPCTSTR lpszFormat, ... );

  用法很简单,就和C语言里的printf函数一样

  比如:

  int count = 3;

  CString str;

  str.Format(“Count is %d”,count);

  这样str就变成了:Count is 3

原文地址:https://www.cnblogs.com/wjq13752525588/p/11468310.html