I'm trying to separate each element in the vector with a comma bar the last. I've looked into using the String.Join method but I don't think that applicable in my situation.
string Room::displayWeapon() {
string tempString = "Weapon in room = ";
int sizeItems = (weaponsInRoom.size());
if (weaponsInRoom.size() < 1) {
tempString = "no items in room";
}
else if (weaponsInRoom.size() > 0) {
int x = (0);
for (int n = sizeItems; n > 0; n--) {
tempString = tempString + weaponsInRoom[x].getShortDescription() ;
x++;
}
}
return tempString;
}