I\'ve been looking for a solution to this but haven\'t found anything that will help. I\'m getting the following errors:
Implicit declaration of function \'s
The problem is that by the time the compiler sees the code where you use sum
it doesn`t know of any symbol with that name. You can forward declare it to fix the problem.
int sum (int values[], int count);
Put that before main()
. This way, when the compiler sees the first use of sum
it knows that it exists and must be implemented somewhere else. If it isn't then it will give a liner error.
You need to add declaration for these two functions, or move the two function definitions before main.