#include <iostream>
#include <iterator>
#include <sstream>
#include <algorithm>

int main()
{

std::size_t kk;
std::string word="spoo";
std::string sentence="seven spoons tables";



for(auto word: {"spoo", "spoons", "tab", "tables", "seven"} )
{
std::stringstream ss(sentence) ;
std::istream_iterator<std::string> f ;
auto it =std::find_if(  std::istream_iterator<std::string> (ss),
                        f,
                        [=](const std::string& str){
                        return str == word;
                        }
 );
 
if(it != f )
 std::cout << "Success for "  << word << std::endl;

}
}