How would you get a program to search char arrays for single words?
eg...
What would I add to this code to make it search for the word "Chris" in the sentence?Code:#include <iostream.h> #include <stdlib.h> int main() { char sentence[25]; cout << "Enter a sentence: "; cin.getline(sentence, 25); return 0; }
Thanks
-Chris