if you need a string, use a string, (std::stringstream could be used). Making a list and then converting it to string looks like overhead.