#include "stdafx.h"
#include "process.h"
double getsum(double *a, double *b, double *c);//声明函数 参数为double类型的指针
int main(int argc,char* argv[])
{
double *sum=new double;
*sum = 0;
double x = 1.33332;
double y = 2.1;
double z = 6.4;
*sum=getsum(&x, &y, &z);//用变量地址做参数调用函数
printf("%g\n",*sum);
delete sum;//释放空间
sum = NULL;
system("pause");
return 0;
}
double getsum(double *a, double *b, double *c)
{
return (*a +*b+ *c );
}