Hi, i want to write a program which gives out "Write any sentence" for example. Thats no problem of course. But is there any way that i can check the input of the user for one specific word? For example lets say the word is "test". So if the user puts in "example test" something should change. But if he only puts in "example" the program should run the normal way.
The following uses stringstreams to the split the sentence into its whitespace-delimited tokens. This could also be done with string operations (find, substr), but the stringstream way of doing it is pretty straightforward.