title: Why the if statement does not work with multiple conditions in C++?
body: <p>I have run into a strange to me problem. For some reason multiple || statements, even divided by commas and parenthesis will not work. The last thing I expected to work is the &amp; statement, which requires for both conditions to be met, but in my case it works for one condition as if it was an OR statement. </p>
  
  <p>Someone please explain to me why is this happening. I am very confused.</p>
  
  <p>WORKS:</p>
  
  <pre><code>#include&lt;iostream&gt; 
  #include&lt;vector&gt;
  #include&lt;string&gt;
  
  using namespace std;
  
  
  int main()
  {
  string quest;
  
  quest = "Where is my dog?";
  
  string::iterator m;
  vector&lt;string&gt;question;
  
  string t;
  
  for(m = quest.begin(); m != quest.end(); m++)
  {
      if(*m != ' ' &amp; *m != ',' &amp; *m != '?' &amp; *m != '.') //works with &amp; and &amp;&amp;
  
      {
          t.push_back(*m);
      }
      else
      { 
          cout &lt;&lt; t &lt;&lt; endl;
          question.push_back(t);
          t.clear();
      }
  }
  }
  </code></pre>
  
  <p>Does not work:</p>
  
  <pre><code>#include&lt;iostream&gt; 
  #include&lt;vector&gt;
  #include&lt;string&gt;
  
  using namespace std;
  
  
  int main()
  {
  string quest;
  
  quest = "Where is my dog?";
  
  string::iterator m;
  vector&lt;string&gt;question;
  
  string t;
  
  for(m = quest.begin(); m != quest.end(); m++)
  {
      if(*m != ' ' || *m != ',' || *m != '?' || *m != '.')    // DOES NOT WORK
      {
          t.push_back(*m);
      }
      else
      { 
          cout &lt;&lt; t &lt;&lt; endl;
          question.push_back(t);
          t.clear();
      }
  }
  }
  </code></pre>