string.find() doesn't work properly : <p>Hello guys I am trying to make an input-output AI and I am trying out some possibilities for the input so I am trying string.find(). But sometimes it doesn't work when I write sentences, probably because of the spaces. Could you take a look and tell me what's wrong or maybe just tell me what to use instead of string.find?()?</p>

<pre><code>    std::string sentence;

std::cin &gt;&gt; sentence;

if (sentence.find("what") != std::string::npos)
{
    if (sentence.find("are") != std::string::npos)
    {
        if (sentence.find("you") != std::string::npos)
        {
            if (sentence.find("?") != std::string::npos)
            {
                std::cout &lt;&lt; "I am an AI" &lt;&lt; std::endl;
            }
        }
    }
}
</code></pre>
