Hexidecimal to decimal conversion
C / C++ / MFC
4
Posts
4
Posters
0
Views
1
Watching
-
Hi, Has anyone out there have a routine that converts a Hexidecmal String to a DWORD? Paul Jahans
-
Hi, Has anyone out there have a routine that converts a Hexidecmal String to a DWORD? Paul Jahans
-
Hi, Has anyone out there have a routine that converts a Hexidecmal String to a DWORD? Paul Jahans
Here's one way to do it. You should add error checking.
DWORD hexStringToDword
(char* szHexString)
{
DWORD dwValue = 0;
sscanf (szHexString, "%X", &dwValue);
return (dwValue);
}/ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com