# Error with square bracket in table

\begin{table}[ht]
\makebox[\textwidth][c]{
\begin{tabular}{ccccc}
\hline
\hline
[] & [] & [] & [] & []\\
[] & [] & [] & [] & []\\
\hline
\hline
\end{tabular}
}
\caption{test}
\end{table}


I cannot run the above code, latex returned an error about missing number, but I can't see anything I am missing.

And the weirdest thing is that

\begin{table}[ht]
\makebox[\textwidth][c]{
\begin{tabular}{ccccc}
\hline
\hline
[] & [] & [] & [] & []\\
\hline
\hline
\end{tabular}
}
\caption{test}
\end{table}


This code works.

Anyone have any idea?

Since \\ allows an optional argument, the [ in the following line is mistaken for it.
......         \\\relax

{[} .... {]}

• ...or add the braces before the next line, as in {} [...]. In this case, either would work, but in some math situations, the spacing could come out differently. – Steven B. Segletes May 31 '18 at 10:09