0

``I am learning how to loadImage in cinder.

I used loadImage function defined in ImageIo.h file, but When I build my code it gives the following error

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

How to resolve it ?

1
  • It's hard to say how to fix it without seeing the code that causes it. There are a few different things that can cause C2440 errors. If you post the relevant section of your code someone might be able to give you a more concrete answer
    – Mattia
    Sep 9, 2014 at 22:01

1 Answer 1

1

Trying to guess without seeing your code. But have you added the parent class type to your ParticleApp class?

Where you declare class ParticleApp { ... }

you should do: class ParticleApp : public cinder::app::AppBasic { ... }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.