0
点赞
收藏
分享

微信扫一扫

CString的GetLength()函数返回为0问题解决


----------------------------------------------------
“If   you   use   the   pointer   returned   by   GetBuffer   to   change   the   string   contents,   you   must   call   ReleaseBuffer   before   using   any   other   CString   member   functions.   ” 

  即调用GetLength()之前,先掉用ReleaseBuffer()函数;

例如:

S.ReleaseBuffer();
  for(i=0; i<S.GetLength(); i++) // 对加密结果进行转换
  { }

举报

相关推荐

0 条评论