所以我试图通过执行以下操作来创建一个二维数组:
unsigned char seqA[] = {1, 2, 3, 4, 5, 1, 2, 3, 4, 5};
unsigned char seqB[] = {1, 2, 3, 4, 4, 1, 2, 3, 4, 4};
unsigned char seqC[] = {3, 2, 1, 5, 4, 3, 2, 1, 5, 4};
unsigned char seqD[] = {1, 1, 2, 2, 3, 3, 4, 4, 5, 5};
unsigned char seq[][10] = {seqA, seqB, seqC, seqD};
而且我尝试这样做时遇到了大量错误:
Warning 1 missing braces around initializer [-Wmissing-braces] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 2 (near initialization for 'seq[0]') [-Wmissing-braces] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 3 initialization makes integer from pointer without a cast [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 4 (near initialization for 'seq[0][0]') [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 5 initializer element is not computable at load time C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 6 (near initialization for 'seq[0][0]') C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 7 initialization makes integer from pointer without a cast [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 8 (near initialization for 'seq[0][1]') [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 9 initializer element is not computable at load time C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 10 (near initialization for 'seq[0][1]') C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 11 initialization makes integer from pointer without a cast [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 12 (near initialization for 'seq[0][2]') [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 13 initializer element is not computable at load time C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 14 (near initialization for 'seq[0][2]') C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 15 initialization makes integer from pointer without a cast [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Warning 16 (near initialization for 'seq[0][3]') [enabled by default] C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 17 initializer element is not computable at load time C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
Error 18 (near initialization for 'seq[0][3]') C:\Users\Jonathan\Documents\Atmel Studio\6.2\GccApplication3\GccApplication3\GccApplication3.c 135 1 GccApplication3
我究竟做错了什么?