Function definitions
Function definitions
- Subject: Function definitions
- From: Jonathan <email@hidden>
- Date: Sat, 08 Apr 2006 15:44:18 -0700
- Thread-topic: Function definitions
Hi--
I'm having a hard time getting my head around one of the concepts in C. If a
function is already defined in the header file, why does it need to be
defined again in the .c?
For example, if I put this in the header file:
int sum (int value1, int value2);
Why do I need to restate it when defining the function implementation again
in the .c:
int sum (int value1, int value2)
{
return (value1 + value2);
}
Isn't one or the other just superfluous?
Best,
Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden