Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <cmath>
- #include <cstdio>
- #include <cstring>
- #include <fstream>
- #include <sstream>
- using namespace std;
- class Creature
- {
- public:
- Creature* operator + (Creature*);
- };
- // TO JUZ W INNYM PLIKU
- Creature* Creature::operator + (Creature* target) { /// this + target
- bool tf = this->hit(target); // czy target żyje -> tf
- if (!tf) cout << target->name << " is hit critically!\n";
- return target;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement