CSendNode类有一个构造函数
CSendNode(char *cpSendbuf,int nSendSz){
m_cpSendbuf=(char*)malloc(nSendSz*sizeof(char));
memcpy(m_cpSendbuf,cpSendbuf,nSendSz); m_nSendSz=nSendSz;
m_pNext=NULL;
};
我在程序的某个地方构造CSendNode类如下
CSendNode *pNode=new CSendNode((char*)cp,nLen);系统显示出一个错误提示
error C2665: 'new' : none of the 4 overloads can convert parameter 2 from type 'unsigned char [17]'那位有空帮我分析一下错误原因好么??
CSendNode(char *cpSendbuf,int nSendSz){
m_cpSendbuf=(char*)malloc(nSendSz*sizeof(char));
memcpy(m_cpSendbuf,cpSendbuf,nSendSz); m_nSendSz=nSendSz;
m_pNext=NULL;
};
我在程序的某个地方构造CSendNode类如下
CSendNode *pNode=new CSendNode((char*)cp,nLen);系统显示出一个错误提示
error C2665: 'new' : none of the 4 overloads can convert parameter 2 from type 'unsigned char [17]'那位有空帮我分析一下错误原因好么??
cp就是代表了一个char *了