What's the simplest way to use a delimiter to separate string values and store it in an array in C++?

Sort of like the String class split() function in Java? Does a similar easy alternative exist in C++?

You can use stringstream in c++.

vector<string> v;
string a,b;
istringstream ss(a);
while(getline(ss,b,' ')){

@ay2306 There isn’t a similar easier alternative then, I’m guessing. This is a more streamlined approach than using plain substrings (although underlying idea is same), so it’s not too bad.