for (jjj = 0; jjj < argc-2; jjj++)
{

itemsg[jjj] = atoi (argv[jjj+2]);
}


static int jjj;
int itemsg[200];


itemsg[jjj] always becomes not...
Pls help...
Jack

Re: how to convert "ff" (string) to integer 255 by Jacky

Jacky
Fri Jun 03 07:04:57 CDT 2005

Solved
itemsg[jjj] = strtoul(argv[jjj+2], 0, 16);



"Jacky Luk" <jl@knight.com> ¼¶¼g©ó¶l¥ó·s»D:OE4kk9CaFHA.3488@tk2msftngp13.phx.gbl...
> for (jjj = 0; jjj < argc-2; jjj++)
> {
>
> itemsg[jjj] = atoi (argv[jjj+2]);
> }
>
>
> static int jjj;
> int itemsg[200];
>
>
> itemsg[jjj] always becomes not...
> Pls help...
> Jack
>
>
>