Strange Error in C++ Program : <p>So I have written a simple calculator for study purpose. But I can't get it working because I get a strange error. I tried everything I could but I couldn't fix the error. Please have a look at it and tell me.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &lt;string&gt;
using namespace std;

double add (double x, double y)
{
double addition = x+y;
return addition;
}
double sub (double x ,double y)
{
double subtraction = x-y;
return subtraction;
}
double mul (double x , double y)
{
double multiplication = x*y;
return multiplication;
}
double div (double x, double y)
{
double division = x/y;
return division;
}
int main ()
{
int x; int y; int op;
cout &lt;&lt; "Enter a number: ";
cin &gt;&gt; x;
cout &lt;&lt; "Enter second number: ";
cin &gt;&gt; y;
cout &lt;&lt; "1: Addition,   2: Subtraction, 3: Multiplication,  4: Division" &lt;&lt;   endl;
cout &lt;&lt; "What operation you want: ";
cin &gt;&gt; op;
switch (op)
{
case 1:
cout &lt;&lt; x &lt;&lt; " + " &lt;&lt; y &lt;&lt; " = " &lt;&lt;  add(x, y);`enter code here`
break;

case 2:
cout &lt;&lt; x &lt;&lt; " - " &lt;&lt; y &lt;&lt; " = " &lt;&lt; sub(x,y);
break;

case 3:
cout &lt;&lt; x &lt;&lt; " * " &lt;&lt; y &lt;&lt; " = " &lt;&lt; mul (x,y);
break;
case 4:
cout &lt;&lt; x &lt;&lt; " / " &lt;&lt; y &lt;&lt; " = " &lt;&lt; div (x,y);
break;
default:
cout &lt;&lt; "Invalid operation"
}

}
</code></pre>
