title: is there a way i can use a if statement in c++ to say if a string is not eqal to either two names it gives a output , atm im not getting it right
body: <pre><code>int main(){
  
      string name;
  
      cout &lt;&lt; "Insert name" &lt;&lt; endl;
  
      cin &gt;&gt; name;
  
      if(name != "months" || "years"){
  
          cout &lt;&lt; "Please only insert 'years' or 'months'" &lt;&lt; endl;
  
      }
  </code></pre>