Visual c++ 炉渣初始化

Visual c++ 炉渣初始化,visual-c++,cinder,Visual C++,Cinder,``我正在学习如何在煤渣中加载图像 我使用了ImageIo.h文件中定义的loadImage函数, 但是,当我构建代码时,会出现以下错误 c:\users\user\particle\src\particleapp.cpp(30): error C2440: 'initializing' : cannot convert from 'ParticleApp *' to 'cinder::app::AppBasic *' 1> Types pointed to are

``我正在学习如何在煤渣中加载图像

我使用了ImageIo.h文件中定义的loadImage函数, 但是,当我构建代码时,会出现以下错误

c:\users\user\particle\src\particleapp.cpp(30): error C2440: 'initializing' : cannot convert from 'ParticleApp *' to 'cinder::app::AppBasic *'


1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

如何解决此问题?

在没有看到代码的情况下尝试猜测。 但是您是否已将父类类型添加到ParticleApp类中

你申报的地方 类p{…}

你应该做:
class ParticleApp:public cinder::app::AppBasic{…}

如果没有看到导致它的代码,很难说如何修复它。有几种不同的情况会导致C2440错误。如果你发布代码的相关部分,有人可能会给你一个更具体的答案