title: C++ suggest parentheses around assignment used as truth value
body: <p>I have some problems with this part of my code:</p>
  
  <p><strong>Employees.cpp</strong>:</p>
  
  <pre><code>void Employees::delete_employee()
  {
      int employee_number;
  
      cout&lt;&lt;"\n..."&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;"Give me the number:";
      cin&gt;&gt;Employee_number;
  
      for(std::vector&lt;EmployeeStruct&gt;::size_type i = 0; i != lista.size(); i++)
          {
              if (employee_number = lista[i].Employee_number)
              {
                  lista.erase(lista.begin() + i);
              }
          }
      cout&lt;&lt;"..."&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;"--------------------------------"&lt;&lt;endl;
  
  }
  </code></pre>
  
  <p>When I compile my code I see something like that: <em>warning: suggest parentheses around assignment used as truth value [-Wparentheses]</em> and I really don't know what to do with that. Maybe it isn't a serious problem, but my program doesn't work like I want. (this code should delete employee)</p>
  
  <p>In <strong>main.cpp</strong> I have:</p>
  
  <pre><code>    case 4:
          {
              Pracownicy p;
              p.usun_pracownika();
          }
      break;
  </code></pre>
  
  <p>Maybe somebody can help me.</p>