如何判定一个CString是一个非法的string?
比如说有如下语句:
BYTE* pByte;
pByte=new BYTE[256];
/*
get data here, we don't know the data is a string or anything other
but we want to get a string!
*/
CString strTest((char*)pByte);
接下来该如何判定,仅仅是IsEmpty()那么简单吗?
比如说有如下语句:
BYTE* pByte;
pByte=new BYTE[256];
/*
get data here, we don't know the data is a string or anything other
but we want to get a string!
*/
CString strTest((char*)pByte);
接下来该如何判定,仅仅是IsEmpty()那么简单吗?
2.String 是乱码,比如如果我们读入一段数据,其实不是char的,但是我们强行转换,就会有乱码,(甚至还有不认识的中文!)