Hello,

I know I am missing something here, can someone tell me how to fix the code below to convert the hex values to a decimal value? At the moment lint1 always equals "0", which is an error;

Code:

char Posn[4] = {0xff,0xff,0xcf,0x13};
char outbuffer[] = {Posn[0], Posn[1], Posn[2], Posn[3]};
long int lint1;

lint1 = strtol (outbuffer, NULL, 0);
printf("The decimal equivalent is: %ld. \n", lint1);



Any ideas?