Answers for "how to parse using stringstream"

C++
0

how to parse using stringstream

#include <iostream>
#include <sstream>

std::string input = "abc,def,ghi";
std::istringstream ss(input);
std::string token;

while(std::getline(ss, token, ',')) {
    std::cout << token << '\n';
}
Posted by: Guest on August-10-2020

Code answers related to "how to parse using stringstream"

Browse Popular Code Answers by Language