C++ program produced many errors
<p>Ok, I'm a complete C++ noob (I only started learning yesterday) and I am trying to write a simple calculator program. I wrote it in notepad, but when i tried to compile it, the cmd produced so many errors it was funny. Can anybody tell me what i'm doing wrong?</p>

<p>Here is my code:</p>

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




int main()
{
double num1;
double num2;
string operator;
double num3;

cout&lt;&lt;"Enter your first number"&lt;&lt;endl;
cin&lt;&lt;num1;
cout&lt;&lt;"Enter the operator"&lt;&lt;endl;
cin&lt;&lt;operator;
cout&lt;&lt;"Enter the next number"&lt;&lt;endl;
cin&lt;&lt;num2;

if(operator=="/"&amp;&amp;num2==0)
{
cout&lt;&lt;"You are attempting to divide by 0. This is impossible and causes the destruction of the universe. However, the answer is infinity"&lt;&lt;endl;
}


if(operator=="+")
{
num3 = num1+num2;
}
else if(operator=="-")
{
num3 = num1-num2;
}
else if(operator=="*"||operator=="x"||operator=="X")
{
num3 = num1*num2;
}
else
{
num3 = num1/num2;
}
return 0;
}
</code></pre>
