CCS中程序错误error: expected a type specifier

zihai123 2012-06-11 09:29:31
#include<stdio.h>
#include <math.h>
#define pi 3.14159265359
#define dt 0.25;


void addtukeywin(unsigned char *dbImage0,int rows,int cols,dt)
{
int i,j;
float per;
float w1[][1];
float w2[1][];
float h[][];
unsigned char *tgImage;
unsigned char *tempImage;
per=dt/2;
//tl = int(per*(n-1))+1;
//th = n-tl+1;
//for(i=0;i<bmpHeight;i++)

for(i=0;i<rows;i++)

{
if(i<=(dt*(float)rows/2)||i>=((float)rows-dt*(float)rows/2))//||i<=(dt*bmpHeight/2)||i>=(bmpHeight-dt*bmpHeight/2)
w1[i][1]=0.5*(1.0+cos((pi*((float)j-per*(float)rows)/((float)rows-per*(float)rows))));
else
w1[i][1]=1.0;
}
for(j=0;j<cols;j++)

{
if(j<(dt*(float)cols/2)||i>=((float)cols-dt*(float)cols/2))//||i<=(dt*bmpHeight/2)||i>=(bmpHeight-dt*bmpHeight/2)
w2[1][j]=0.5*(1.0+cos((pi*((float)i-per*(float)cols)/((float)cols-per*(float)cols))));
else
w2[1][j]=1.0;
}
for(i=0;i<rows;i++)
for(j=0;j<cols;j++)
{
h[i+j]=w2[i][1]*w1[1][j];
}

for(i=0;i<rows;i++)
for(j=0;j<cols;j++)
{
tempImage[i+j]=dbImage[i+j]*w[i+j];

}

for(i=0;i<rows+64;i++)
for(j=0;j<cols+64;j++)
{
if(32<=i<608&&32<=j<800)
tgImage[i+j]=tempImage[i-32+j-32];
else tgImage[i+j]=0.0;
}

}
这是源程序错误如下:[addtukeywin.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -fr"C:/my project/zeros_calibration/Debug" -d"_DEBUG" -mv6400 -@"Debug.lkf" "addtukeywin.c"
"addtukeywin.c", line 10: error: expected a type specifier
"addtukeywin.c", line 10: error: expected a ")"
"addtukeywin.c", line 10: error: expected a declaration
At end of source: warning: parsing restarts here after previous syntax error
3 errors detected in the compilation of "addtukeywin.c"
...全文
3294 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
BcgBcr 2012-06-27
  • 打赏
  • 举报
回复
遇到相同问题,不过是在objective-c里面的Channel*

1,075

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧