Quote:
prog.h: definition of "test"
test.c: body of "test"
|
The definition of a function *is* it's body.
I think you mean that the *declaration* is in prog.h
Code:
/* declaration */
int factorial(int);
/* definition */
int factorial(int n) {
if (!n) return 1;
return n * factoral(n - 1);
}
hth --Jonas