السلام عليكم..
سؤال في برنامج السي بلس بلس (C++)
أنا عملت برنامج شوية طويل.. وفيه أكثر من فنكشن (غير main() أنا عملت فنكشنس جديدة..
مشكلتي في هذا الفنكشن:
يعطيني خطأ error بهذي الصيغة:كود:double COS (double rad, int n_term){ int i(1); double sum(1); for (i; i <= n_term; i++){ sum += pow(-1,i)*((pow(rad,(2*i))/fact(2*i))); } return (sum); }
مع العلم ان كل المجاهيل المستخدمة تم تعريفهاكود:1>h:\squ\c++\assignments\assignment 3\assignment_3\assignment_3\hw3_89569.cpp(70) : error C2668: 'pow' : ambiguous call to overloaded function 1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)' 1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)' 1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)' 1> while trying to match the argument list '(int, int)'
ويش هو الخطأ؟؟
وكيف ممكن أعدله؟؟
شكراً
رد مع اقتباس

المفضلات