cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Using abs()
Using abs()
Jul 22, 2011 at 8:20pm UTC
Anon1010
(20)
Why do I have to declare the variable as a double or float? Why won't it work as an integer?
Jul 22, 2011 at 8:48pm UTC
Intrexa
(291)
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.