/ Published in: C
This piece of code will read a hex argument such as: ff or ab from your command line and stores it as a integer
Expand |
Embed | Plain Text
/* IN: program ff aa OUT: Values: ff, aa */ int main (int argc, char *argv[]) { unsigned int values[2]; values[0] = strtol(argv[1], NULL, 16); values[1] = strtol(argv[2], NULL, 16); }
You need to login to post a comment.
