Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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 << '
';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #parse #stringstream
ADD COMMENT
Topic
Name
7+2 =