Perhaps someone can show me how to fix the following example code so either the function outputx() or outputy() is passed to the function print_it().
void do_it(); // prototype
void outputx(); // prototype
void outputy(); // prototype
void print_it( print_character() ); // prototype
void outputx()
{
printf("x\n")
}
void outputy()
{
printf("y\n")
}
void print_it( print_character() )
{
//effectively becomes either outputx(); or outputy();
print_character();
}
void do_it()
{
// pass the function outputx() to print_it()
print_it( outputx() );
// pass the function outputy() to print_it()
print_it( outputy() );
}
Regards, MaaleaRogers