int calc(int x, int y, int z){
return x+y+z;
}
#include "calc.c"
#include <stdio.h>
int main()
{
int x = 1;
int y = 2;
int z = 3;
int result;
result = calc(int x, int y, int z);
printf("x=%d, y=%d, z=%d, result=%d", x,y,z,result);
}
I have two .c files, calc.c and calctest.c which includes a main function and calls calc.c.
I have two errors on line 11 of the main function with result. First: expected expression before int. Second: too few expressions to function calc.