c++ Find string when given only part of it inside an array like structure -
It is in the form of a word, we say that I have been given the string "foo", and my array Words like "food", "fool", "fu" inside should be printed out of three.
I have not made a concert effort yet because I do not know how to wrap my head around it. Any ideas?
Assume that you are using std :: string
If you have a vector of strings, you can use it (for example) with string :: find
Can be used. > Std :: remove_copy_if to print all the words from the vector in which the chosen words are:
#include
results:
< Pre> food waste foo tofoo
Comments
Post a Comment