Hi, first of all, hadn’t been using C++ for years until recently. What I am trying to do is using a list of objects created from a struct that I created and rendering them inside update function.
My struct is simple as follows;
struct tlEntry{
cocos2d::Sprite* s;
int yPos;
};
Depending on the yPos they got, I want to add the sprite to the viewport. When I try to get the node from the list and try to do following, I get EXC_BAD_ACCESS error;
addChild(entries.front().s);
What am I doing wrong?
4 posts - 2 participants