为什么只能得出第一个字符,后面的全不见了,环境是VS2005
char *buf=new char[1024];
CString out;
int cc;
cc=m_connectsocket.Receive(buf,1024);
if(cc!=SOCKET_ERROR)
{
buf[cc]=NULL;
out=buf;
CString msg;
CString from;
int len=out.GetLength();
msg=out.Right(len-3);
if(server){
from="客户机:";
}
else{
from="服务器:";
}
msg=from+msg;
m_listmsg.AddString(msg);
为什么只能得出第一个字符,后面的全不见了,环境是VS2005