CString转换char*

来源:互联网 发布:年收入上亿 知乎 编辑:程序博客网 时间:2024/06/15 07:41
    CString cstr1 = "ASDDSD";
int strLength = cstr1.GetLength() + 1;
char *pValue = new char[strLength];
strncpy(pValue, cstr1, strLength);
原创粉丝点击