ContainerToStr is a container and convert code snippet to convert a container to std::string.
#include <sstream> template <class Container> const std::string ContainerToStr(const Container& c, const std::string& seperator = " ") { std::stringstream s; std::copy(c.begin(),c.end(), std::ostream_iterator<typename Container::value_type>(s,seperator.c_str())); return s.str(); }