成员变量
CSplashDlg m_dlgSplash;m_dlgSplash.Create(IDD_SPLASH, this);//此行出错
m_dlgSplash.ShowWindow(SW_SHOW);error C2664: 'int __thiscall CDialog::Create(const char *,class CWnd *)' : cannot convert parameter 1 from 'const int' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
遇到这种问题真是莫名奇妙
CSplashDlg m_dlgSplash;m_dlgSplash.Create(IDD_SPLASH, this);//此行出错
m_dlgSplash.ShowWindow(SW_SHOW);error C2664: 'int __thiscall CDialog::Create(const char *,class CWnd *)' : cannot convert parameter 1 from 'const int' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
遇到这种问题真是莫名奇妙
得:
CSplashDlg *m_dlgSplash = new CSplashDlg;m_dlgSplash->Create(IDD_SPLASH, this);//此行出错
m_dlgSplash->ShowWindow(SW_SHOW);
CSplashDlg m_dlgSplash;
是成员变量
改成这个也是同样的错误。。
CSplashDlg *m_dlgSplash = new CSplashDlg;
m_dlgSplash->Create(IDD_SPLASH, this);//此行出错
m_dlgSplash->ShowWindow(SW_SHOW);
还是同样的错误
参数给的不对吧?他需要的是一个char 你给的是一个整数
我到vc知识库问到了答案
把
m_dlgSplash.Create(IDD_SPLASH, this);
改成
m_dlgSplash.Create(IDD_SPLASH);
就可以了
不知道为什么为这样