I have a char array called temps
that is passed to a function. The format will always be like this:
1 1.1
I want to split it up and save these two numbers. These is a space between them but after researching strtok()
, I have no idea how it works.
void seperate(char *tempformat){
char s1[10];
char s2[10];
s1 = strtok();
s2 = strtok();
}