plz help me for this. i was trying to find similar words from two sentences string1 and string2.but i having problem with using strtok and strcpy together.plz some one help me to do this.my program i have copy below :
1. Remember to use code tags to properly format your code.
2. You should use the std::getline() function instead of a for() loop to get input from the user.
3. If your compiler knows about it, use strtok_s() instead.
4. Your second while loop uses the wrong counter. Copy/paste much? :-)
5. You need to protect your loops in the case more than 15 words are found and in the case the token (the word) is longer than 19 characters. Otherwise you'll corrupt the stack.
6. I believe you are missing the last token if the sentence doesn't end with a space, or in general, with one of the defined delimeters (you have defined the space only so far). You should also define punctuation symbols as delimeters.