Unlimited generator

Pages: 12
Oh, thanks. So what do I put into the asteroids.push_back();? asteroids.push_back(int);?asteroids.push_back(POINT);?
I thought you said you knew how to use vectors :P
I know how to use vectors, but not with those kinds of data types.


You have a vector that contains a sf::CircleShape so you are going to want to push an object of type [code]sf::CircleShape[/tt] into it. I edited my last post and provided an example, though I strongly suggest you look at the references for vectors.
Sorry, I only know how to use vectors for like ints and stuff. Thanks a lot!
Sorry, I only know how to use vectors for like ints and stuff. Thanks a lot!
There should be no difference in using a vector with int's than there is with a vector of sf::CircleShape's as it is templated. std::vector<T> where T is any type.http://www.cplusplus.com/reference/vector/vector/
Last edited on
Topic archived. No new replies allowed.
Pages: 12