如图,题主想把一个二维数组传入名为convert的函数中,但vscode就是硬要说函数头有问题😫:
终端面板内容:
> Executing task: C/C++: g++.exe 生成活动文件 <
正在启动生成...
F:\MinGW\bin\g++.exe -fdiagnostics-color=always -g E:\acc\lights.c -o E:\acc\lights.exe
E:\acc\lights.c:6:32: error: use of parameter outside function body before ']' token
void convert(int m, bool (*a)[m], int t)
^
E:\acc\lights.c:6:33: error: expected ')' before ',' token
void convert(int m, bool (*a)[m], int t)
^
E:\acc\lights.c:6:35: error: expected unqualified-id before 'int'
void convert(int m, bool (*a)[m], int t)
^~~
生成已完成,但出现错误。
终端将被任务重用,按任意键关闭。
错误面板内容: