error: expected primary-expression before ‘=’ token when using for loops
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6162438/lvalue-required-as-left-operand-of-assignment">lvalue required as left operand of assignment</a><br>
  <a href="http://stackoverflow.com/questions/8570020/lvalue-required-as-left-operand-of-assignment-c-program">lvalue required as left operand of assignment (C program)</a>  </p>
</blockquote>



<p>I am getting this error  on my code and I am not sure why. Please help!
The error is:</p>

<p>error: expected primary-expression before ‘=’ token</p>

<p>This is the part of my code i'm having the issue with.
a and b were already previously declared as ints.</p>

<pre><code>   int i = 0;
   for( i == a; i &lt; = b; i = i + 1)  // ERROR IS IN THIS LINE
   {  int j = 1;
      int N = static_cast&lt;int&gt;(sqrt(i));

      for( j = 1; j &lt; = N; j = j + 1)   // ERROR IS IN THIS LINE
      {  int P = i%j;
         if( P == 0 &amp;&amp; j!= 1 &amp;&amp; j!= i)
         {  j = N + 1;
         }
         if( P != 0 &amp;&amp; j == N)
         {  cout &lt;&lt; i &lt;&lt; "is prime" &lt;&lt; endl;
         }                                         
      }
   }                                                     
</code></pre>
