Skip to main content

iI have a rather newbie question but iI can't figure it out.Lets

Lets say iI have this char array:

char array[] = "10,11,12,1,0,1,0";

How tocan I convert thisit to an array of intsint like this?

int arrayINT[] = {10,11,12,1,0,1,0};

i have 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 to convert this to an array of ints like this?

int arrayINT[] = {10,11,12,1,0,1,0};

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};
Corrected desired array to what author actually wants
Source Link

i have 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 to convert this to an array of ints like this?

int arrayINT[] = {"10"10,"11"11,"12"12,"1"1,"0"0,"1"1,"0"0};

i have 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 to convert this to an array of ints like this?

int arrayINT[] = {"10","11","12","1","0","1","0"};

i have 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 to convert this to an array of ints like this?

int arrayINT[] = {10,11,12,1,0,1,0};
Source Link
Loading