Enough dilly-dally, let's see a real, working, C++ function that actually does something! Suppose we need a function that, adds two numbers and return their sum..
int sum(int num1,int num2)
This is our function. Everytime it takes two parameters (integers) and return their sum..
In our main we call it like this..
cout<<c<<endl; // c=17