我很久沒用過C了。這裏發生了什麼?GCC結構編譯器怪異數組
wOCR.c:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token wOCR.c:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token on this code: struct wOCR_matchGrid { char character; int * data; }; struct wOCR_matchGrid alphaMatch[26]; alphaMatch[0].character = 'A'; /*8*/ alphaMatch[0].data = { /*9*/ 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1 };
你不能在函數之外放置任意C代碼。 – 2009-08-29 18:30:49