I have a rather newbie question but I can't figure it out.
Lets say I have this char array:
char array[] = "10,11,12,1,0,1,0";
How can I convert it to an array of int like this?
int arrayINT[] = {10,11,12,1,0,1,0};
If you have a C string containing ASCII numbers with a common delimiter (comma in this case) you can use the
Note that |
|||||||||
|
int arrayINT[] = { 10, 11, 12, 1, 0, 1, 0 }
? – Mark Smith Mar 22 '16 at 11:43