Help with "No matching member function for call to 'addChild'"


#1

I’ve been fiddling with 2dx v3 and c++ for a couple days now, coming from a little java experience on android.

Let me say that this has been a rude awakening for me :stuck_out_tongue:

I get “No matching member function for call to ‘addChild’” any time I try to call addChild() from inside any of my own functions. It was my understanding that any functions in the helloworld class would inherit all the functions/properties of the class.
I built the “HelloWorld” project and added a little animation, tilemapped level, the requisite physics for those to be useful, and I keep having to do clumsy workarounds for a problem I simply don’t understand and can’t find mention of anywhere (probably because it’s stupefyingly simple).

Anyway… having fun!
Ha, be well all.


#2

well, you can’t just addChild() to just any class.

Do you have any code to demonstrate your issue?