bool isActive(string wname) { for (auto it = worlds.begin(); it != worlds.end(); ) { if (it->name == wname) { cout << wname << " is active" << endl; return true; } else { ++it; } } }