I write code:
cocos2d::Vector<cocos2d::Vector<cocos2d::Object *>> object2ds;
But It error,In CCVector.h line72: Static_assert failed “Invalid Type for cocos2d::Vector!”.
My question is how to create 2d Array use cocos2d::Vector in cocos2dx3.0.
Thanks~:)
Dit you figure out how to do this?
i see the following in the constructor of verctor
static_assert(std::is_convertible<T, Ref*>::value, “Invalid Type for cocos2d::Vector!”);
Ref = cocos2d::Ref.
Since, as far as i See, but correct me if i’m wrong, the vector class does not inherit from cocos2d::Ref this assertion will always fail…
Or is there any other solution for handling 2d vectors?
helloo
this is not the way
i can’t declare 2d vector or array and can’t use it
please tell the solution how to define and access 2d vector or array in cocos2d-x c++