string lastNames(string name[],int SIZE){
stringstream ss;
for(int i = 0; i < SIZE; i++){
ss << '"' << name[i].substr(0) << name[i].erase(name[i].find(',')) << '"' << " ";
}
return ss.str();
}
this is outputting my list of names correctly other than all the names come out twice like "namename"
how can i stop this?