for (iter = keywords.begin(); iter != keywords.end(); iter++) { if (iter != keywords.begin()) cout << ", "; cout << *iter; }