In my project i need make a snake represented by a chain of Sprites. I want store that sprites in two-dimensional vector. But despite all my attempts I stil get error.
error C2039: ‘__this’: is not a member of ‘std::vector<std::vector<cocos2d::Sprite *,std::allocator<_Ty>>,std::allocator<std::vector<_Ty,std::allocator<_Ty>>>>’
with
[
_Ty=cocos2d::Sprite *
]
Sorry for the mistakes, English is not my first language.
I’m trying create somthing like backwards classic snake game. Player plants flowers, snakes trying eat that. To control snake movement and interactions i wanna create vector. It’s my first cocos project, so i copy lot of things, not fully understanding how them work.
addChild - i use that to add sprites to scene. It working)))