December 11th, 2003, 12:40 PM
convert hex to int
I have the following
dbgprint("Lower provider socket = 0x%x LSP Socket = 0x%x\n", NextProviderSocket, NewSocket);
which outputs the hex value of NextProviderSocket, NewSocket..
How can i convert that to integer value?? what is the conversion code??
would appreciate your response
December 11th, 2003, 01:44 PM
Change %x to %i for displaying signed integers, or to %u for unsigned integers.
December 11th, 2003, 02:17 PM
lookup the format expressions for the printf family. Your dbgprint makes definitely use of one of them.
December 11th, 2003, 03:34 PM
Thank you very much for your help... you solved my problem.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!