送分100分:关于CString和STRNCAT冲突的问题。
以下是部分代码:
unsigned int biaohao1 = 4323;
CString sbiaohao1;
CString bank=" ";//50个空格
sbiaohao1.Format("%d",biaohao1);
strncat(sbiaohao1,bank,16-strlen(sbiaohao1)) ;
执行到最后一行时提示:
error C2664: 'strncat' : cannot convert parameter 1 from 'class CString' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
请问是什么原因。
如何在SBIOHAO1的尾部添加16-strlen(sbiaohao1) 个空格 。
还有一个问题是如何将两个CSTRING的变量的字符串进行连接。
谢谢大家。