I tried the following code from one of the guys who answer my previous question.
My case is I am trying to get the value 1.2597 in this string, and my non functional requirement is to use strtok
instead of boost
which is recommend by many fellow coders here.
However I got a issue casting result into a cstr* that can use the strtok
.
I want to know how I can get 1.2597, and echo it out with strtok
string result= "CCY 1.2597 Down 0.0021(0.16%) 14:32 SGT [44]";
char *first = strtok(result, ' ');
char *second = strtok(0, ' ');