#include <stdio.h>
typedef struct stan {
char name[10];
double data;
}STAN;
double method(STAN *st);
double(*pf) (STAN *st);
int main(void)
{
STAN s = {
"123",
33.33
};
STAN *result = &s;
printf("result1 %s",result ->name);
pf = method;
double sum = pf(result);
printf("result2 %f", sum);
getchar();
return 0;
}
double method(STAN *st)
{
return st->data;
}