I have to read the arguments that I introduce when I run a program on linux.
./myprog 10 20 30, 20 54 12, 31 42 51
I have a problem finding out how to separate the arguments into a substring and then that substring in other string.
10 20 30, 20 54 12, 31 42 51
I want to separate this string into another string with "," being the separator and then that substring to separate into another string with " " being the separator.
a[0]="10 20 30"
a[1]="20 55 12"
a[2]="31 42 51"
Then I want it to be like that:
b[0]="10" b[1]="20" b[2]="30" and so on...