使用pow函数后报错: undefined reference to `pow‘
请问如何解决呢?
翻译过来是 不能确认pow
#include<math.h>
且不能用变量名表示,只能是数字eg pow(2,3);
添加 #include <math.h>pow是math.h中申明的算法函数
先引入math.h
如果加了#include<math.h>还是出现问题,那么就是pow(a,b)中ab其一使用的是变量,其实两个都不能使用变量,只能是常量。