I want to put a string with different data types into separate arrays, suppose I have the following string (In each line, each "field" is separated by a white space " ") :
string s = "1 2 3 Hello_world
3 4 1 Hi_world
1 5 3 Bye_world"
I want to put this string into 4 separate arrays, each array is the values in each column so it will display something like this when displayed:
s[0] = 1, 3, 1
s[1] = 2, 4, 5
s[2] = 3, 1, 3
s[3] = Hello_world, Hi_world, Bye_world
How do I initialize and achieve these arrays? Other languages have a function called split (C#, PHP etc), what about C++?
Also, I can only use Arrays, not vector. Please someone advice. Thank you!