Hex String to Decimal long
-
Hi, This must be really simple, but I am struggling with this. If I have a string such as: TCHAR hex[] = "0AF79E00"; How can I convert this into a long variable so I know it means: 184,000,000 Is this possible? :confused: Thanks in advance, Simon
-
Hi, This must be really simple, but I am struggling with this. If I have a string such as: TCHAR hex[] = "0AF79E00"; How can I convert this into a long variable so I know it means: 184,000,000 Is this possible? :confused: Thanks in advance, Simon
use sscanf: TCHAR hex[] = "0x0AF79E00"; int value; sscanf(hex, "%X", &value); Chris Hafey
-
Hi, This must be really simple, but I am struggling with this. If I have a string such as: TCHAR hex[] = "0AF79E00"; How can I convert this into a long variable so I know it means: 184,000,000 Is this possible? :confused: Thanks in advance, Simon