#include <bits/stdc++.h>
      using namespace std;
      vector<string> split(const string& s, const char& sep) {
      	string token;
      	stringstream X(s);
      	vector<string> tokens;
      	while (getline(X, token, sep)) {
      		tokens.push_back(token);
      	}
      	return tokens;
      }
      int32_t main()
      {
      	char sep = ',';
      	string s = "a,b,c";
        vector<string> arr = split(s, sep);
        	
      	return 0;
      }
      
      Cpp language logo

      split string c++

      Split string in c++

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.