// Example with functions
#include <iostream>
#include <cstdlib>
// function definition - include the code for the function
void funct1(int param)
{
int local = 0;
cout << "In funct1: " << param << endl;
}
int main()
{
cout << "Starting Main" << endl;
// function call
funct1(1);
cout << "In Main" << endl;
funct1(2);
cout << "Ending Main" << endl;
// send the value of zero back the Operating System
return 0;
// The value of zero indicates normal execution of the program
// The program "terminated normally"
// Another function that is that same as "return 0;" is "exit(int);"
exit(0);
// exit() can be used at any location in your program to stop
// execution.
// "return" is a C++ operator; while "exit()" is a library function
}