Frage

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?

War es hilfreich?

Lösung

Try to use strtol():

strtol("FA", NULL, 16);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top