Obstacle *obstacles_A[]
Obstacle *obstacles_A[]
To copy to clipboard, switch view to plain text mode
This is incorrect - it doesn't carry the dimensions of the array and you probably trash your stack or something like that.
You should definitely use a vector or a list:
QList<Obstacle*> obstacles;
obstacles << new Obstacle(...);
//or
obstacles.resize(10);
obstacles[7] = new Obstacle(...);
QList<Obstacle*> obstacles;
obstacles << new Obstacle(...);
//or
obstacles.resize(10);
obstacles[7] = new Obstacle(...);
To copy to clipboard, switch view to plain text mode
Bookmarks