Hi,
I've started to make a Flappy Bird clone just for practice, and getting back to making games after a little pause. Now I've just finished implementing a Pillar class and an ObstacleManager class, that generate, move, and delete pillars when they're out of the screen. In the ObstacleManager I store a vector of Pillar* objects, and my problem is that if I call any function of this vector, my program crashes. My code is using push_back(), empty(), front(), back(), begin(), erase(), size() and clear(), I've tried all of them individually and my program crashed. There must be something wrong with my code but I cant figure out whats the problem. I'm using vectors in other parts of the code too, and all of them works without problem. This vector of Pillar* objects always crashes but only if I call a function.
Has someone met this problem before? What could be the problem?