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

posted @ 2019-09-05 17:10  渔阳俊俊  阅读(2715)  评论(0编辑  收藏  举报