Parse CHAR pointers
-
Hello! I'm newbie in C/ANSI programming. I have another problem: i have a char *c="word1 word2 word3"; how can I obtain the word in separate strings? This is what I want to do: char *c="word1 word2 word3"; char **words; after proccessing the string c I want to have words[0]="word1"; words[1]="word2"; words[2]="word3"; Thank you!
-
Hello! I'm newbie in C/ANSI programming. I have another problem: i have a char *c="word1 word2 word3"; how can I obtain the word in separate strings? This is what I want to do: char *c="word1 word2 word3"; char **words; after proccessing the string c I want to have words[0]="word1"; words[1]="word2"; words[2]="word3"; Thank you!
try looking up strtok(), sample usage in MSDN library. INTP
-
Hello! I'm newbie in C/ANSI programming. I have another problem: i have a char *c="word1 word2 word3"; how can I obtain the word in separate strings? This is what I want to do: char *c="word1 word2 word3"; char **words; after proccessing the string c I want to have words[0]="word1"; words[1]="word2"; words[2]="word3"; Thank you!