Q
Hello I have a string
"12345" for example,
I'd like to change it to put the first n digits(123 for example) into
int a=123,
the 4,5 digits to be b=45.
Now I am using atoi.
I parse the string "12345" first to be s1,s2,
and then change it to be a=atoi(s1) b=atoi(s2)
Any better way for it?
Thanks a lot!
"12345" for example,
I'd like to change it to put the first n digits(123 for example) into
int a=123,
the 4,5 digits to be b=45.
Now I am using atoi.
I parse the string "12345" first to be s1,s2,
and then change it to be a=atoi(s1) b=atoi(s2)
Any better way for it?
Thanks a lot!