|
-
June 30th, 2011, 04:21 PM
#3
Re: In c , how come function may have several declarations but only one definition?
A declaration says "Such a thing exists." It doesn't matter how many times you say this, so long as you're consistent about the interface. (C++ doesn't even require that, since it allows function overloading.)
A definition says "This is what it is." If you say that multiple times, the linker will shrug in confusion about which one is really what it is.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|