To avoid this warning, you should explicitly declare the function abs for usage.
[code]#include <stdio.h>
int abs(int someInteger);
int main(int argc, const char * argv)
{
…
printf(“The abs val of -5 is %d\n”, abs(5));
return 0;
}
[/code]
To avoid this warning, you should explicitly declare the function abs for usage.
[code]#include <stdio.h>
int abs(int someInteger);
int main(int argc, const char * argv)
{
…
printf(“The abs val of -5 is %d\n”, abs(5));
return 0;
}
[/code]
try:
#include <stdlib.h>
Mitch
Or you know, do what the book does and include:
You need that one in order for abs() to work.
From the book: “Both functions are declared in stdlib.h:”