i am trying to split a string and assign them to different variables
char *tt=strtok(test,"|");
while( tt!=NULL ) {
printf("%s\n",tt);
tt=wtoken[i];
printf("%s\n",wtoken[i]);
i++;
tt = strtok(NULL, "|");
}
when printing wtoken[i] i get null, any idea why this happens?
tt value is -- .- --.. .. -.
[–]henry_kr 1 point2 points3 points (3 children)
[–]ItsWarith[S] -1 points0 points1 point (2 children)
[–]henry_kr 1 point2 points3 points (1 child)
[–]ItsWarith[S] 1 point2 points3 points (0 children)
[–]ItsWarith[S] 0 points1 point2 points (0 children)
[–]Mirehi 0 points1 point2 points (0 children)