title: How to use "in" keyword in c++
body: <p>Hey I am a new C++ learner, I have been creating a program that do something specific...
  I take input from the user, and converted it into a lowercased sentence,  then I use the &quot;in&quot;keyword like we use in python.... For example in python :</p>
  <pre><code>main_input = input(&quot;Type exit with a bunch of other words: &quot;)
  lower_input = main_input.lower()
  if &quot;exit&quot; in lower_input:
      exit()
  else:
      pass
  </code></pre>
  <p>What this does is that searches for the exit keyword from the input(like &quot;ok you can <strong>exit</strong> now&quot;) and follows accordingly, exits the program.
  But how to use &quot;in&quot; keyword in c++?
  <strong>I want to do something like this</strong>:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &quot;boost/algorithm/string.hpp&quot;
  using namespace std;
  
  int main() {
  
      while(true){
          std::string main_input;
          std::cout &lt;&lt; &quot;Type something: &quot;;
          std::cin &gt;&gt; main_input;
          std::string lower_input = boost::algorithm::to_lower_copy(main_input);
  /* the if statement below this, here is the problem...*/
          if(&quot;exit&quot; in lower_input){
              std::cout &lt;&lt; &quot;Exiting&quot;;
              /* after that other statements if necessary to execute*/
  
          }
  
      }
    
  }
  </code></pre>
  <p>Can anyone tell me how to do that?? Thanks in advance!</p>