error C2440: 'type cast' : cannot convert from 'struct IDispatch *' to 'class CsgGrid'
No constructor could take the source type, or constructor overload resolution was ambiguous
我想是不是要在改cpp文件头少了一个头文件?
谢谢
No constructor could take the source type, or constructor overload resolution was ambiguous
我想是不是要在改cpp文件头少了一个头文件?
谢谢
解决方案 »
- 关于CreatePen的基础问题
- CHtmlView中如何从内存中加入HTML文件
- dll 如何取得当前路径? dll 和 exe 不在同个目录下~
- 包含文件的问题。
- 如何在vc中画图形而不出现很多重复的框????
- 如何 在 static 函数中调用 非static 函数 ?
- 我的一个while循环要花费大量的时间使系统好象死机,如何在执行他的时候让操作系统响应其他的操作?
- 我想在一个程序中输入一段c程序,怎样验证它的语法是否有错,并编译它,得出结果,怎么实现啊
- 学习VC的步骤?
- C++Debug Assertion Failed! mfc140ud.dll occcont.cpp Line:925
- Java 与 .net 哪个有用呢?
- 如何动态调整控件的大小?
struct MyStruct;MyStruct get_c1();struct MyStruct
{
int i;
static MyStruct get_C2();
};MyStruct get_C3();typedef MyStruct (*FC)();FC fc1 = &get_c1; // C2440, line 15
FC fc2 = &MyStruct::get_C2; // C2440, line 16
FC fc3 = &get_C3;class CMyClass {
public:
explicit CMyClass( int iBar)
throw() {
} static CMyClass get_c2();
};int main() { CMyClass myclass = 2; // C2440
// try one of the following
// CMyClass myclass(2);
// CMyClass myclass = (CMyClass)2; int *i;
float j;
j = (float)i; // C2440, cannot cast from pointer to int to float
}
CsgGrid CsgColumns::GetGrid()
{
LPDISPATCH pDispatch;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CsgGrid(pDispatch);
}
上面的问题