atoi() from hex representation string

后端 未结 1 1726
天命终不由人
天命终不由人 2020-12-15 16:38

Need to make int from hex representation string like \"0xFA\" or better \"FA\". Need something like atoi(\"FA\"). Is there are any sta

相关标签:
1条回答
  • 2020-12-15 17:18

    Try to use strtol():

    strtol("FA", NULL, 16);
    
    0 讨论(0)
提交回复
热议问题