Hello,
I'm looking for a way to count a specific word in a string, here's an example of what I've written
So I want to put in a loop and look for these words, I was thinking of using strstr function, but that just looks the strings once.Code:char TextString[]="hello this is a test string, used used used to count specific words"; char *StringToSearch[3]={"this","a", "used"}; int this_count=0, a_count=0, used_count=0;
Do you have a solution?