字符串与16进制之间的转换 .

 DWORD 就是 Double Word, 每个word为2个 字节的长度, DWORD双字即为4个字节,每个字节是8位,共32位
   
typedef unsigned long       DWORD;

typedef unsigned char       BYTE;

typedef unsigned short      WORD;

57DD8是一个16进制的字符串  
 
	DWORD number=0; 
         CString srev; 
	sscanf("57DD8","%x",&number); 
	srev.Format( "%d",number );
	srev.Format( "%d",srev );

转换完后 srev 的值为:359896

你可能感兴趣的:(技术备忘录)