Comparing Strings and Enums

How do I compare a string vector against an enumerated type? My code so far is:
void convertToLastFirst(vector<string>&names){
enum NameFormat{FIRST, LAST};
for (size_t i = 0; i < names.size(); i ++){
if (names[i] FIRST){
names[i] = LAST;
}
}
}

So you're asking how you compare an array of letters to a numerical type... Well it's quite simple actually, you don't. Even your function name is ambiguous, what is it that you're trying to do OP? Maybe check out std::map?
Topic archived. No new replies allowed.