May be this example can help you:

Code:

#include <iostream>
#include <math.h>
struct tbl
{
std::string cmdtxt;
double (*funki)(double a);
};
struct tbl tabelle[3] = {
{"sin", sin},
{"cos", cos},
{"tan", tan},
};
double bogenmass(double grad);
int main (int argc , char **argv)
{
int i;
double winkel = 30.000;
std::cout << "Enter an angle > 0 and < 90 degree: ";
std::cin >> winkel;
for(i = 0; i < 3; i++)
std::cout << tabelle[i].cmdtxt << "(" << winkel<< ") = " << tabelle[i].funki(bogenmass(winkel)) << std::endl;
return 0;
}
// Wandelt grad in Bogenmass um
double bogenmass(double grad)
{
double boma, pi = 3.141592653589793;
boma = (grad * pi) / 180;
return boma;
}