I used the abs()
function and I added #include <math.h>
at the top of code. But I keep getting this error:
hello.c:20:11: warning: implicit declaration of function 'abs' is invalid in C99
[-Wimplicit-function-declaration]
int a = abs(arrOfHour[i] - hour) * 60 + minute;
^
I'm using LLVM compiler.
Why does this error occurs even though I have included math.h
?