One more hint: use std::map<string,whatever> instead of that long list of if(strcmp(...)==0).