It encapsulates block specific function, increased code reusability
Function of the structure:
Key return type function name (parameter type parameter 1, parameter type, parameter 2, ....) {
Function body
Return Value Returns;
}
How the idea to write a function
1 determines that the function has no parameters several parameters
2 does not need to determine the function return value of type
4 function overloading
1 When functions can be overloaded
Function to achieve the same functionality but different parameters and internal implementation reload function representing for convenience the same function can use the function of
2 function overloading rules :( only with relevant parameters)
Parameter types, different number and different sequence, in order to reload