#include #include #include #include #include #include int main() { std::string s = "Hello,How,Are,You,Today"; std::vector v; std::istringstream buf(s); for(std::string token; getline(buf, token, ','); ) v.push_back(token); copy(v.begin(), v.end(), std::ostream_iterator(std::cout, ".")); std::cout << '\n'; }