I am parsing a string in C++ using the following:
using namespace std; string parsed,input=\"text to be parsed\"; stringstream input_stringstream(input); i
#include #include using namespace std; int split_count(string str,char delimit){ return count(str.begin(),str.end(),delimit); } void split(string str,char delimit,string res[]){ int a=0,i=0; while(a
P.S: Works only if the lengths of the strings after splitting are equal