
Patrick B. answered 04/21/20
Math and computer tutor/teacher
I've always put them in the definition...
the header must show the complete function definition and arguments
using namespace std;
#include <iostream>
void printChar( int n, char chChar='*')
{
for (int iLoop=0; iLoop<n; iLoop++)
{
cout<<chChar;
}
}
int main()
{
printChar(10);
cout << endl;
printChar(15,'#');
}