'for'之前的语法错误

and*_*rey 0 c function

我收到错误:'for'之前的语法错误,我只是不明白为什么?你能解释一下为什么吗?我在代码中几乎没有类似的错误.

#define N 1024

 void Reverse_Binary( double *a, unsigned long Len);

int main()
   // here is error as well: error: syntax error before '{' token
{
 //here are different variables for all code

 buf = malloc(num_items*sizeof(double));

 //here are different functions

 Reverse_Binary(buf,N); 
}

void Reverse_Binary( double *a,unsigned long Len)  
{
    long x, xprim;
    int temp;

    for (x=0; x<Len; x++)
    {
         xprim= rev(x,N);   

         if (xprim > x)
         {
             temp = a[x];
             a[x] = a[xprim];
             a[xprim] = temp;s
         }
     }  
}
Run Code Online (Sandbox Code Playgroud)

Hei*_*bug 6

你错过了主要的结束.

放一个括号后:

Reverse_Binary(buf,N);

} //that's the missing bracket
Run Code Online (Sandbox Code Playgroud)

同时删除Reverse_Binary函数后的最后一个括号.