Can anyone plz give an example for this statement " a function can have many declaration but only one definition"?
Can anyone plz give an example for this statement " a function can have many declaration but only one definition"?
What is a function declaration and what is a function definition? Give examples.Originally Posted by Saurabh Mehta
Construct two programs, each of which is to have a main function that calls a function named foo: one program declares foo many times but defines it exactly once; the other defines foo multiple times. Compile both programs. What do you observe?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
function foo is already defined error
Can you plz give example on this notion?