关于函数数组指针混乱之战-qq群求助+解答

Will(95367158)  16:56:05
有谁指点一下下面的程序啊
Will(95367158)  16:56:14
#include "math.h"


#define   pi 3.1416
#define   Point 1024


float x1r[Point],*x1i[Point]={0};
float x2r[Point],x2i[Point]={0};

void multi( int N,float *x1,float *x2);
void put_in(int N,float *x1,float *x2);
void FFT(int N,float *xr,float *xi,int ntype);


//数据处理程序
void dataprocess()
{

 int  i;


//上游信号fft变换后取共轭
 void put_in(Point,float *x1r,float *x1i);
 void FFT(Point,float *x1r,float *x1i,1);
 for (i=0;i<Point;i++)
  {
    *x1i[i]=-*x1i[i];
  }

//下游信号fft变换
 void put_in(Point,float *x2r,float *x2i);
 void FFT(Point,float *x2r,float *x2i,1);
 
//上下游信号相乘后取IFFT变换
 void multi(Point,float *x1r,float *x2r);
 void FFT(Point,float *x1r,float *x1i, -1);

}
 
//输入子程序
void put_in(int N,float *x1,float *x2)
{
 int i;
 float p=3.1416;

 for(i=0;i<N;i++)
 {
  x1[i]=cos(p*i*i/N);
  x2[i]=0;
  }
}


 void multi( int N,float *x1,float *x2)

  int  j,i=0;
  float t;
  for(j=0;j<1024;j++)
   {
    t=x1[i];
t=x2[i]*t;
x1[i]=t;
i++;
   }
}
Will(95367158)  16:56:32
编译后
Will(95367158)  16:56:50
[2812_DataProcess.c] "E:\ccs3.3\C2000\cgtools\bin\cl2000" -g -fr"C:/Users/will/Desktop/2812 project ngguan_flowmeter_6/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"../Debug.lkf" "2812_DataProcess.c"
"2812_DataProcess.c", line 36: error: expected a type specifier
"2812_DataProcess.c", line 37: error: expected a type specifier
"2812_DataProcess.c", line 37: error: expected a type specifier
"2812_DataProcess.c", line 44: error: declaration may not appear after executable statement in block
"2812_DataProcess.c", line 44: error: expected a type specifier
"2812_DataProcess.c", line 45: error: declaration may not appear after executable statement in block
"2812_DataProcess.c", line 45: error: expected a type specifier
"2812_DataProcess.c", line 45: error: expected a type specifier
"2812_DataProcess.c", line 48: error: declaration may not appear after executable statement in block
"2812_DataProcess.c", line 48: error: expected a type specifier
"2812_DataProcess.c", line 49: error: declaration may not appear after executable statement in block
"2812_DataProcess.c", line 49: error: expected a type specifier
"2812_DataProcess.c", line 49: error: expected a type specifier
13 errors detected in the compilation of "2812_DataProcess.c".

>> Compilation failure

Compile Complete,
  13 Errors, 0 Warnings, 0 Remarks.

Will(95367158)  16:57:11
哪位大侠指导一下
Will(95367158)  16:57:20
想了好久,改不动了
Will(95367158)  17:00:11<

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值