Addictgamer Posted March 6, 2010 Share Posted March 6, 2010 Language: C++ Take a look at this scenario: We have class goomba { int wx, wy; } And we want to create a new instance of this class every few seconds. How do we create a new instance? I've looked into many methods already, just didn't manage to get something that works. Anybody who has knowledge on this, please help me. Link to comment Share on other sites More sharing options...
Anonymouse Posted March 6, 2010 Share Posted March 6, 2010 In C++? Link to comment Share on other sites More sharing options...
Addictgamer Posted March 6, 2010 Author Share Posted March 6, 2010 >.< Forgot to specify eh. Yes. Link to comment Share on other sites More sharing options...
Anonymouse Posted March 6, 2010 Share Posted March 6, 2010 python solution WOULD be: import time goombas = [] while True: goombas.append(goomba(x, y)) time.sleep(1) of course it's not python. For the waiting, you can #include <time> though and use sleep(seconds). For the adding, you'd probably use a vector (idk how). Link to comment Share on other sites More sharing options...
TheDoctor Posted March 6, 2010 Share Posted March 6, 2010 You are such a show off mouse. I'll google it. Link to comment Share on other sites More sharing options...
Addictgamer Posted March 6, 2010 Author Share Posted March 6, 2010 ALready spent a whole year googlign this. Anyway, I think if I did goomba *goombas[]; Well, I do that with my tile system and it works... Link to comment Share on other sites More sharing options...
Recommended Posts