map<string, string>::iterator itNames = namemap.find(names[i]); //make sure this name is in namefile
if (itNames != namemap.end()) { name += namemap[names[i]] + ","; } //you found it in namefile
map<string, string>::iterator itNames = namemap.find(names[i]); //make sure this name is in namefile
if (itNames != namemap.end()) { name += namemap[names[i]] + ","; } //you found it in namefile