質問

Need to make int from hex representation string like "0xFA" or better "FA". Need something like atoi("FA"). Is there are any standard solutions for that?

役に立ちましたか?

解決

Try to use strtol():

strtol("FA", NULL, 16);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top