Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Heli() :
- _x(0),
- _y(0),
- _z(0),
- max_height(0),
- min_height(0),
- max_load(0),
- _load(0)
- {
- }
- void Add_Load(int last);
- void Remove_Load(int last);
- void Heli::Add_Load(int load) {
- _load += load;
- if(_load != 0)
- {
- max_height = Heli.max_height / (_load*10);
- }
- }
- int main()
- {
- Heli a(100,-10,0,6000,0,300,0); // x,y,z-Position, max./min. Flightheight; max. Load, load
- cout << "helicopter: " << a << endl << endl;
- a.Add_Load(100);
- cout << a << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement