powを使いたいです。
use of undeclared identifier 'pow'
というエラーコードが出てしまいます。
<math.h>を入れなければならない事を知ったので、初めに
#include <math.h>
を入れたら
すごく長いエラーコードが出てきました。どうすればいいですか。
39:23: error: no matching function for call to 'pow'
double d= pow(a*i)/q;
^~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:996:1: note:
candidate function template not viable: requires 2 arguments, but 1 was
provided
pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:985:46: note:
candidate function not viable: requires 2 arguments, but 1 was provided
inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long d...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:984:46: note:
candidate function not viable: requires 2 arguments, but 1 was provided
inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp...
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:429:15: note:
candidate function not viable: requires 2 arguments, but 1 was provided
extern double pow(double, double);
^
1 error generated.