#include <iostream>
#include <cmath>
#include "typedef.h"
using namespace std;


struct point
 {
   _INT x, y;
 };


double distance (point p1, point p2);


int main()
 {
   point a= {0, 0};
   point b= {1, 9};

   double dist_a_b = distance(a, b);

   cout << a.x << "," << a.y << "와" << b.x << ", " << b.y << "의거리 =" << dist_a_b << endl;

   return 0;
 }


double distance (point p1, point p2)
 {
   double distance;

   distance = sqrt(pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2));

   return distance;
 }


이렇게하면 두 점의 거리가 나와야되는데.. 자꾸만 에러뜸.. 뭐가잘못된거에요?... ㅜㅜ..
이렇게 에러두개가뜸..
1>e:\myspace\120122_st\120122_st\120122.cpp(29) : error C2668: 'pow' : 오버로드된 함수에 대한 호출이 모호합니다.
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): 'long double pow(long double,int)'일 수 있습니다.
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): 또는       'float pow(float,int)'
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): 또는       'double pow(double,int)'
1>        인수 목록 '(int, int)'을(를) 일치시키는 동안
1>e:\myspace\120122_st\120122_st\120122.cpp(29) : error C2668: 'pow' : 오버로드된 함수에 대한 호출이 모호합니다.
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): 'long double pow(long double,int)'일 수 있습니다.
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): 또는       'float pow(float,int)'
1>        c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): 또는       'double pow(double,int)'