For Programmers: Free Programming Magazines  


Home > Archive > VC Language > June 2005 > how to convert "ff" (string) to integer 255









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to convert "ff" (string) to integer 255
Jacky Luk

2005-06-03, 9:09 am

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



Jacky Luk

2005-06-03, 4:02 pm

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
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com