sqrt problem in c++
<p>Why are there errors here?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;math.h&gt;
#include &lt;vector&gt;
#include &lt;ostream&gt;

using namespace std;

struct Point {
    int x,y;
};

int distance (const Point&amp; a,const Point&amp; b){
    int k= sqrt(((a.x-b.x)*(a.x-b.x))+((a.y-b.y)*(a.y-b.y)));
}

int main(){
    return 0;
}
</code></pre>

<p>Build output:</p>

<pre><code>1&gt;------ Build started: Project: distance, Configuration: Debug Win32 ------
1&gt;  distance.cpp
1&gt;d:\...\distance.cpp(13): error C2668: 'sqrt' : ambiguous call to overloaded function
1&gt;          c:\...\vc\include\math.h(589): could be 'long double sqrt(long double)'
1&gt;          c:\...\vc\include\math.h(541): or       'float sqrt(float)'
1&gt;          c:\...\vc\include\math.h(127): or       'double sqrt(double)'
1&gt;          while trying to match the argument list '(const int)'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>
