c++初学者 数组和函数问题 求助改错

奇数幻阶方问题,输入n,输出n*n方阵
#include
#include
#define Maxn 12
using namespace std;
int a[Maxn][Maxn];
int i,j,n,count=1;
bool b[Maxn][Maxn];
int f(int i,int j)
{
if(b[i-1][(j+1)%3])
return {a[++i][j%3]=count; b[i][j]=1;}
return {a[--i][++j%3]=count;
b[i][j]=1;}
}
void work()
{
for(count=2;count<=n*n;count++)
{
if(i=1)
i=n+1;
f(i,j);
}
}
void output()
{
for(i=0;i<=n;i++)
{
for(j=0;j<=n;j++)
cout< cout }
}
int main()
{
cin>>n;
memset(a,0,sizeof(a));
memset(b,0,sizeof(b));
i=1;
j=(n+1)/2;
a[i][j]=count;
b[i][j]=1;
work();
output();
return 0;
}

编译结果:

d:\我的文档\未命名1.cpp In function 'int f(int, int)':
11 9 d:\我的文档\未命名1.cpp [Warning] extended initializer lists only available with -std=c++11 or -std=gnu++11
11 27 d:\我的文档\未命名1.cpp [Error] expected '}' before ';' token
d:\我的文档\未命名1.cpp At global scope:
12 5 d:\我的文档\未命名1.cpp [Error] expected unqualified-id before 'return'
14 1 d:\我的文档\未命名1.cpp [Error] expected declaration before '}' token

output函数少了个花括号""}""