I'm new to C++ programming and I'd like to ask you how you usually manipulate objects from the same class..
to better explain myself..here it is an example:
[header]
- {l Code}: {l Select All Code}
class Missile {
private:
int initial_x_position;
int x_position;
public:
Missile(int init_x);
Move();
...
...};
Missile::Missile(int init_x) {
initial_x_position = init_x;
}
Move::Missile() {
x_position++;
}
[main]
- {l Code}: {l Select All Code}
...
Missile Miss1(10);
Missile Miss2(20);
Missile Miss3(30);
[b][end][/b]
so how could I move them together without calling them 1 by 1? like..
Miss1.move();
Miss2.move();
Miss3.move();
thank you in advance..