I'm just started learning c++. In Java, to split an input, you would just to have to use the split method to split the spaces from an input. Is there any other simple way, where you can split a string input in an integer array? I don't care about efficiency; I just want some codes that could help me understand how to split spaces from an input.
An example would be: Input: 1 2 3 4 Code:
int list[4];
list[0]=1;
list[1]=2;
list[2]=3;
list[3]=4;