title: Error: expected primary-expression before char
body: <p>I have a problem in the <code>if</code> clause I guess the code is correct but I don't know why there is a problem.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
     int a;
     cout&lt;&lt;"Enter a Number and we will tell you the loop"&lt;&lt;endl;
     cin&gt;&gt;a;
     {
        if(a=char)
        {
           cout&lt;&lt;"Enter only Numbers"&lt;&lt;endl;
        }
        else
        {
           cout&lt;&lt;"The value is: ";&lt;&lt;a&lt;&lt;endl;
        }
  
     }
     do
     {
        cout&lt;&lt;a&lt;&lt;endl;
        a++;
     } while(a&lt;=10);
     cout &lt;&lt; "Hello world!" &lt;&lt; endl;
     return 0;
  }
  </code></pre>
  
  <p>It would be great..Thanks</p>