我定义了一个类MdsDDBridge,MdsDDBridge里定义了一个成员变量是CFile类型的:
CFile file1;
然后再构造函数里加了代码:file1=new CFile();
当MdsDDBridge a=new MdsDDBridge();时报错如下:Compiling...
error C2440: 'initializing' : cannot convert from 'class MdsDDBridge *' to 'class MdsDDBridge'
No constructor could take the source type, or constructor overload resolution was ambiguousMdsDDBridge.cpp
error C2582: 'CFile' : 'operator =' function is unavailable
CFile file1;
然后再构造函数里加了代码:file1=new CFile();
当MdsDDBridge a=new MdsDDBridge();时报错如下:Compiling...
error C2440: 'initializing' : cannot convert from 'class MdsDDBridge *' to 'class MdsDDBridge'
No constructor could take the source type, or constructor overload resolution was ambiguousMdsDDBridge.cpp
error C2582: 'CFile' : 'operator =' function is unavailable
解决方案 »
- 关于输出的一个小问题
- gdi+中的image为什么不能先声明然后调用image.fromfile
- 如何实现网络数据库
- 如何隐藏一个新进程的界面???
- 请问各位使用ADO的大侠朋友,为什么我这么做不能将记录绑定在CComboBox上呢
- CPropertyPage的OnOK()问题
- 怎样实现在EDIT中显示多种彩色文本?
- 初学者的一个关于“hello world!”程序的问题
- ■■十万火急,紧急求教WIN2000-PROFESSOR的ADMINISTRATOR密码丢失,如何找回?找到,全部送分!!■■
- 如何用TC使编译后的文件为LIB?
- 问一个串口通讯方面的怪问题,你碰到过吗?
- 好喜欢Acrobat Reader7.0的界面.
然后m_pFile=new CFile;
error C2440: 'initializing' : cannot convert from 'class MdsDDBridge *' to 'class MdsDDBridge'
No constructor could take the source type, or constructor overload resolution was ambiguous
{
DSN="oradb9i";
UserName="testuser";
PassWord="testuser";
DataBase="Oracle";
System="Oraclesystem";
XmlFileName="D:\\test.txt";
file1=new CFile;}
m_pFile=new CFile;MdsDDBridge* a=new MdsDDBridge();