I have a string that occurs in this format:
.word 40
I would like to extract the integer part. The integer part is always different but the string always starts with .word. I have a tokenizer function which works on everything except for this. When I put .word (.word with a space) as a delimiter it returns null.
How can I extract the number?
Thanks
You can use sscanf to extract formated data from a string. (It works just like scanf, but reading the data from a string instead of from standard input)