Your void function works just fine - when it is called! main() doesn't do anything and just returns. In c/C++ main() is the function that is executed when the program is run.
PS When posting code please use code tags so that the code is readable!
Putting all that together we get the following. That took about 2 minutes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
void display();
// begin main Function Definition
int main()
{
display();
return 0;
} //end of main function.
void display()
{
cout << "Assignment 5b\n"
<< "Programmed by Rodger Coleman\n\n";
}
Assignment 5b
Programmed by Rodger Coleman
Program ended with exit code: 0