CString和string互转

  CString转string

  CString strMfc = "test";

  std::string strStr = strMfc.GetBuffer(0);

  string转CString

  CString strMfc;

  string strStr = "test";

  strMfc = strStr.c_str();

posted @ 2023-06-15 17:55  中班小小石  阅读(50)  评论(0)    收藏  举报