importing c code into MS visual C++ express edition
i am using c++ expression edition. i imported a c code but when i try to build it i get an error c2668. i tried to follow previous web advice but to no avail. part of the code is as follows:
void
InitializeApplication(NET* Net){
INT n1,n2;
REAL x1,x2,y1,y2;
REAL Alpha1, Alpha2;
Gamma = 7;
for (n1=0; n1<NUM_CITIES; n1++) {for (n2=0; n2<NUM_CITIES; n2++) {Alpha1 = ((REAL) n1 / NUM_CITIES) * 2 * PI;
Alpha2 = ((REAL) n2 / NUM_CITIES) * 2 * PI;
x1 = cos(Alpha1);
y1 = sin(Alpha1);
x2 = cos(Alpha2);
y2 = sin(Alpha2);
Distance[n1][n2] = sqrt(sqr(x1-x2) + sqr(y1-y2));
}
}
and the error is as follows
c:\documents and settings\farayi\my documents\visual studio 2005\projects\bmproject\boltzman.cpp(105) : error C2668: 'asin' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 8\vc\include\math.h(543): could be 'long double asin(long double)'
1> c:\program files\microsoft visual studio 8\vc\include\math.h(495): or 'float asin(float)'
1> c:\program files\microsoft visual studio 8\vc\include\math.h(108): or 'double asin(double)'
1> while trying to match the argument list '(int)'
please help me i have tried all sorts of things.
thank you

