Using abs()

Why do I have to declare the variable as a double or float? Why won't it work as an integer?
http://www.cplusplus.com/reference/clibrary/cstdlib/abs/

It takes either an int or a long. Can I see the code where you are calling it, and where you are declaring the variable that is about to be called?
Topic archived. No new replies allowed.