Cannot declare std::vector<PhysicsShapePolygon> allShapes;

Cannot declare std::vector<PhysicsShapePolygon> allShapes;
0

#1

I cannot declare vector container for PhysicsShapePolygon in header, I am getting error.
where is problem?

std::vector<PhysicsShapePolygon> allShapes;

cocos2d::PhysicsShapePolygon::~PhysicsShapePolygon’: cannot access protected member declared

Error C2248 ‘cocos2d::PhysicsShapePolygon::~PhysicsShapePolygon’: cannot access protected member declared in class ‘cocos2d::PhysicsShapePolygon’ (compiling source file …\Classes\AppDelegate.cpp) …\xmemory0 951


#2

Classes with protected destructor have their own reason, it might not be a proper way to do so.


#3

thanks, I actually try to access sprite shape to count polygon points


closed #4

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.