Using operator ^ with `double` operands emits compiler error
<p>I have come up with some code and it does not compile.</p>

<p>Error   1   error C2296: '^' : illegal, left operand has type 'double'<br>
    2   IntelliSense: expression must have integral or enum type    </p>

<p>The code I was able to come up with is as follows:</p>

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

void getnumbers();
void showmean();
void showdev();

double x1, x2, x3, mean, dev;

void getnumbers()
{
    cout&lt;&lt;"Please enter three numbers\n";
    cin&gt;&gt;x1,x2,x3;
}

void showmean()
{
    mean=(x1+x2+x3)/3;

    cout&lt;&lt;"The mean of"&lt;&lt;x1&lt;&lt;", "&lt;&lt;x2&lt;&lt;", "&lt;&lt;x3&lt;&lt;" is "&lt;&lt;mean&lt;&lt;endl;
}

void showdev()
{
    dev=sqrt((x1 - mean)^2) + (x2 - mean)^2 + (x3 - mean)^2/3;

    cout&lt;&lt;"The standard deviation of"&lt;&lt;x1&lt;&lt;", "&lt;&lt;x2&lt;&lt;", "&lt;&lt;x3&lt;&lt;" is "&lt;&lt;dev&lt;&lt;endl;
}

int main()
{
    getnumbers();
    showmean();
    showdev();

    system("pause");

    return 0;
}
</code></pre>
