Functions terms

I'm little confuse about these three terms:
1.interface to functions
2. function declarations
3. implementation of the functions

An example with comments pointing to these terms will be very helpful. Thanks in advance
http://www.cplusplus.com/doc/tutorial/functions/

2. I declare that there is a function with name "foo" that takes one int parameter and returns a float. Now I can write code that uses foo.

3. This is what the foo actually does.


1. A class has interface. Functions don't.
I'm sorry, I'm still confuse about that. More explanation please or an example will be helpful!
1. As @keskiverto said, no such thing. You could say that the parameters its takes sort of behaves as one, though.

2. Declaring: float foo(int a);

3. Implementing: float foo(int a) { return a * 1.5f; }
Last edited on
The link I gave has a section titled "declaring functions". Was that part of the explanation too short? (It has example code too.)
Topic archived. No new replies allowed.