0
我只是想創建從一個b2Shape
b2PolygonShape
,但我有一個錯誤,指出:Dynamic-cast from 'const b2Shape*' to 'b2PolygonShape*' casts away qualifiers
從'const b2Shape *'到'b2PolygonShape *'的動態投射轉換了限定符?
這是我的代碼:
const b2Shape *s = fix2.shape;
b2PolygonShape *p = dynamic_cast<b2PolygonShape*>(s);
我在做什麼錯?