C++ error: no match for 'operator>>' : <p>I'm somewhat new to C++ and I was trying to write a code to make a basic c++ calculator, but when I try to build it the following error pops up:</p>

<p>"error: no match for 'operator>>' (operand types are 'std::basic_ostream::__ostream_type {aka std::basic_ostream}' and 'char')|"</p>

<p>The code is:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string.h&gt;

using namespace std;

void add(int x, int y)
{ cout&lt;&lt;"First number:";
cin&gt;&gt;x;
cout&lt;&lt;endl&lt;&lt;"Second number:";
cin&gt;&gt;y;
cout&lt;&lt;endl&lt;&lt;x&lt;&lt;"+"&lt;&lt;y&lt;&lt;"="&lt;&lt;x+y;
}

void subtract(int x, int y)
{
cout&lt;&lt;"First number:";
cin&gt;&gt;x;
cout&lt;&lt;endl&lt;&lt;"Second number:";
cin&gt;&gt;y;
cout&lt;&lt;endl&lt;&lt;x&lt;&lt;"-"&lt;&lt;y&lt;&lt;"="&lt;&lt;x-y;
}

void multiply(int x, int y)
{
cout&lt;&lt;"First number:";
cin&gt;&gt;x;
cout&lt;&lt;endl&lt;&lt;"Second number:";
cin&gt;&gt;y;
cout&lt;&lt;endl&lt;&lt;x&lt;&lt;"*"&lt;&lt;y&lt;&lt;"="&lt;&lt;x*y;
}

void divide(int x, int y)
{
cout&lt;&lt;"First number:";
cin&gt;&gt;x;
cout&lt;&lt;endl&lt;&lt;"Second number:";
cin&gt;&gt;y;
cout&lt;&lt;endl&lt;&lt;x&lt;&lt;"/"&lt;&lt;y&lt;&lt;"="&lt;&lt;x/y;
}

int main()
{
int x,y;
char z;
cout &lt;&lt; "\t\t\t Welcome to the C++ Calculator." &lt;&lt; endl;
cout &lt;&lt; "What operation would you like to perform? ";
cout &lt;&lt; "Add(+), Subtract(-), Multiply(*), Divide(/):"&lt;&lt;
cin &gt;&gt; z;
cout &lt;&lt;endl;
if (z=='+')
    add(x,y);
else if (z=='-')
    subtract(x,y);
else if (z=='*')
    multiply(x,y);
else if (z=='/')
    divide(x,y);
else if ((z!='+')&amp;&amp;(z!='-')&amp;&amp;(z!='*')&amp;&amp;(z!='/'))
    cout&lt;&lt;"Unknown symbol.";
return 0;
}
</code></pre>
