CString和char[]互转

  只有以NULL结尾的char[]才能强制转换为CString,即可以直接等于,否则需要通过Format函数

  char charArray[]="this C++";

  CString res;

  res.Format("%s", charArray); 

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