Hello world!!
I need help with somethig that makes me angry every ime that i wnat to do it.
Lets say that i got a class that have all the things that have a monster health, attack function, damage.... and i want to like loop the monster as many times as i want (like doombuilder that you can make as many monsters as you can) like a sizeble array. can someone help me? thanks if someone can answer this.
(sorry for my grammar if somhthink is wronge. im learning english)
You probably need an object to hold the state: health, attack function, damage etc.
Your loop updates the object's state on each iteration. I don't think there' an array issue. You may need an array or list of monsters that are updated each time thru the loop, but that's slightly different.
I need the staff like the videogames that have like mutltiple obejects in the world and i dont understand very well those vectores but thx for the help
You can store the multiple instances of class Actor_s in a container. If there's a lot of deletion/insertion going on, a std::list is the best approach ( http://www.cplusplus.com/reference/stl/list/ ). Then you just loop through the instances and update them or whatever.
Step by step im leraning ponters right now i can learn all at the same time but i will try thx for all the answers!! i dont understand list and vectores but can someone do somthing simple. actuali i take a look on de code of the game doom they dont use that the using like pointers in C
Check out the arrays/pointers in the tutorial. In C, there are no STL containers but in C++ they would be the way to go. http://www.cplusplus.com/doc/tutorial/