我定义一个变量
CString str1;//为全局变量
CString str2;CEdit* editPar=(CEdit*)GetDlgItem(IDC_EDIT2);
editPar->GetWindowText(str2);
str1 = str2;结果就报错了error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no acceptable conversion)
这个是为什么啊,我应该如何解决啊
CString str1;//为全局变量
CString str2;CEdit* editPar=(CEdit*)GetDlgItem(IDC_EDIT2);
editPar->GetWindowText(str2);
str1 = str2;结果就报错了error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no acceptable conversion)
这个是为什么啊,我应该如何解决啊
解决方案 »
- vc6 编写的一个内嵌IE8浏览器窗口,开程序一段时间会死循环!!!!求助!!!!!
- VC 中 求圆形按钮!
- VC.net 里的Add Member Variable Wizard右侧的ControlVariable和下面的选项,在VC++6.0的哪里找阿????谢谢!!!!
- 用StretchDIBits显示图像后获取图像数据失败
- 关于Cwebbrowser2的使用(VC++)!
- 错误提示的求答4
- AttachThreadInput一直失败
- CSocket::OnClose()到底在什么时候被调用
- 向各位VC高手请教Windows下调试程序的工具?
- 询问wyzegg
- com 接口 uuid 是怎么生成的,如何通过2003直接用向导生成一些接口
- 有combobox的clistctrl滚动时有重影?
str1.Format("%s",str2);
正确写法:
extern CString str;