Tokenize String Using C++

Mukit, Ataul - Sep 26 '18 - - Dev Community
std::string input = "We, are, all, strangers, here"; // our input
char delim = ','; // our delimiter


std::istringstream ss(input);
std::string token;

std::vector<std::string> tokens;
while(std::getline(ss, token, delim)) {
    tokens.push_back(token);
}

// tokens contain the array of tokenized strings separated by delimiter 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player