Define a split string function to ...
| 86 | |
| 87 | // Define a split string function to ... |
| 88 | static std::vector<std::string> split_string(const std::string& input, char delimiter) { |
| 89 | std::vector<std::string> tokens; |
| 90 | std::istringstream stream(input); |
| 91 | std::string token; |
| 92 | while (std::getline(stream, token, delimiter)) { |
| 93 | tokens.push_back(token); |
| 94 | } |
| 95 | return tokens; |
| 96 | } |
| 97 | |
| 98 | int main(int argc, char ** argv) { |
| 99 | srand(1234); |