编译器问题

P1307 [NOIP2011 普及组] 数字反转

DarkStalker @ 2016-11-20 16:27:14

这个题目为什么不能用 abs 和 pow 函数? 我包含了 math.h 头文件啊

还是报错

/tmp/tmpratJPf.c: In function 'main':

/tmp/tmpratJPf.c:19:2: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]

temp = num = abs(num);

^ /tmp/ccqQHPIZ.o: In function `main':

tmpratJPf.c:(.text+0xc0): undefined reference to `pow'

collect2: error: ld returned 1 exit status


by greykid @ 2016-11-26 10:22:53

没有using namespace std


by username_invalid @ 2016-12-30 20:30:22

FK YOU


|