#include #include #include #include "citytable.h" int citytable::get_index(string s) { int n = name.size(); for (int i = 0; i < n; i += 1) if (name[i] == s) return i; return -1; } int citytable::add(string s) { name.push_back(s); return name.size() - 1; } int citytable::get_number() { return name.size(); } void citytable::print() { for (int i = 0; i < name.size(); i += 1) cout << i << ": " << name[i] << "\n"; }