#include #include struct monster_t { std::string name; int health; }; std::ostream& operator << (std::ostream& os, const monster_t& m) { os << m.name << " (" << m.health << ")"; return os; } int main(int argc, char* argv[]) { std::vector army; for(int i=0; i<10; i++) army.push_back(monster_t { "Pikachu" + std::to_string(i), i }); for(monster_t m: army) std::cout << m << std::endl; return 0; }