ClientDriver for remote access and EmbeddedDriver for local access
The default constructor should always use the simplest, possible way
to connect to an embedded database.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
/**
* function_pointers.c
*/
#include <stdio.h>
#include <stdlib.h>
int plus (int a, int b)
{
return a + b;
}
int minus (int a, int b)
{
return a - b;
}
int func (int (*ptrFunc) (int, int), int a, int b)
{
return ptrFunc (a, b);
}
int main (int argc, char **argv)
{
printf ("Result: %d\n", func (&plus, 10, 20));
printf ("Result: %d\n", func (&minus, 10, 20));
return EXIT_SUCCESS;
}