I need to be able to convert hex values to a signed integer. I'm currently using the below:
strtol(data, NULL, 16);
but when data is equal to something like 'FFFFFE' the result comes out to be massively positive instead of small and negative. Can anyone tell me how I can retrieve the negative result?
Thanks,
James