I'm trying to use strtoul to convert a string to an int. However, I need to use the 'end' pointer and am having issues doing it properly. I have a series of 2 character numbers stored like: 11223344. Each is actually a separate number : 11 22 33 44. The code I have is:
strtoul(&time_array[0],&time_array[1],0);
And it returns a -1.
I've got another way to do it, but would like to know what I'm doing wrong. I'm having issues finding good resources on the internet.
Thanks!
strtoul(&time_array[0],&time_array[1],0);
And it returns a -1.
I've got another way to do it, but would like to know what I'm doing wrong. I'm having issues finding good resources on the internet.
Thanks!