я получил ошибку: «синтаксическая ошибка перед« для »» и я просто не понимаю, почему? Не могли бы вы объяснить, почему это так? У меня есть несколько похожих ошибок в коде.
#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
}
}
}