#include #include #include #include #include "weapon.hpp" class Missile : public Weapon { public: Missile(std::string const& s, int i = 10) : Weapon(0), name(s) { std::cout << "Created missile '" << s << "'\n"; std::cout << "Fuel load is " << i << "\n"; } Missile(std::string const& s, int i, int j) : Weapon(0), name(s) { std::cout << "Created missile '" << s << "'\n"; std::cout << "Fuel load is " << i << "\n"; std::cout << "Speed is " << j << "\n"; } void fire() { std::cout << "Fire " << name << "!\n"; } std::string name; }; BOOST_PLUGIN_EXPORT(Weapon, Missile, "Missile"); BOOST_PLUGIN_EXPORT_LIST();