各位大虾麻烦过来给看看哪里的问题
#include<stdio.h>#include"head.h"
#define n 250000
main()
{
struct benjilixi node[313],*p;
double sum=0;
int i;
FILE *fp;
fp=fopen("goufangdaikuang.txt","w");
i=0;
for (p=&node[1];p<=&node[312];p++)
{
i++;
p->n=i;
p->li_xi=(n-(i-1)*n/312)*0.003675;
p->ben_xi=p->li_xi+n/312.0;
p->yu_e=(n-i*n/312.0);
}
fprintf(fp,"n\t\tli_xi\t\tben_xi\t\tyu_e\n");
for(p=&node[1];P<=&node[312];P++)
{ sum+=p->ben_xi;
fprintf(fp,"%d\t\t",p->n);
fprintf(fp,"%g\t\t",p->li_xi);
fprintf(fp,"%g\t\t",p->ben_xi);
fprintf(fp,"%g\n",p->yu_e);
}
fprintf(fp,"sum=%g\n",sum);
}
这是头文件
struct benjilixi
{
int n;
double li_xi;
double ben_xi;
double yu_e;
};
这是用vc编写的程序 但是编译不了 麻烦看看!!!谢谢...