我想将一个二维数组传递到一个名为convert的函数中,但vscode坚持认为函数头有问题.
代码:
#include <stolo.n>
#include <stdbool.h>
#include <string.h>
#include <math.h>
void convert(int m, bool (*a)[m], int t) {
for (int j = 0; j < m; j++)
{
a[0][j] = (t >> i) & 1;
}
}
控制台显示错误:
lights.c acc
use of parameter outside function body before 'I' token gcc [6, 32]
expected ')' before , token gec [6, 33]
expected unqualified-id before 'int' gcc [6, 35)