关键代码: sscanf( "0x4988E348AED3C" , "%I64x" , &nValude );
关键是 64位的支持
void strTest()   
{   
    char* p = "0x4988E348AED3C";      
    char* str;      
    __int64 i = strtol(p, &str, 16);
    printf("%d\r\n", i);

    {
        char* p = "0x4988E348AED3C";      
        __int64 nValude = 0;
        sscanf( "0x4988E348AED3C" , "%I64x" , &nValude );
        //sscanf(p, "%x", &nValude);      
        printf("%lld\r\n", nValude);  
    }
 } 

  

posted on 2019-08-13 15:07  swing07  阅读(4771)  评论(0编辑  收藏  举报