A function is basicly a variable(void included) that does different things.
A simple example:
Code:
void say_hello(){cout<<"Hello!"}
True, this is a very, extremely, simple function but you could do them as long as you wish/need(as this is only a one function, function)
Once the "blueprint"is writen(example of a blueprint given) all you have to do is write the name and it will do whatever it is programmed for(cout'ting hello!) as in
Code:
void say_hello(){cout<<"Hello!"}
main(){say_hello(); //will cout "Hello!"}