我有这段代码:
static char szTop[] = "iMsg wParam lParam";
static char szUnd[] = "____ ______ ______";
static char szFormat[] = "%-16s%04X-%04X %04X-%04X";
static char szBuffer[50];
static HWND hwndButton[NUM];
它给了我错误:
error C2143: syntax error : missing ']' before ';'
error C2143: syntax error : missing ';' before ']'
另一个代码是:
for(i=0;i<NUM;i++)
hwndButton[i] = CreateWindow ( "button", button[i].text, WS_CHILD | WS_VISIBLE | button[i].style, cxChar, cyChar * (1+2*i), 20*cxChar, 7*cyChar/4, hwnd, (HMENU) i, ((LPCREATESTRUCT) lParam )->hInstance, NULL );
return 0;
这给了我错误:
error C2146: syntax error : missing ')' before identifier 'i'
error C2059: syntax error : ';'
error C2059: syntax error : ')'
error C2146: syntax error : missing ';' before identifier 'hwndButton
我之前将所需的东西定义为:
static char szTop[] = "iMsg wParam lParam";
static char szUnd[] = "____ ______ ______";
static char szFormat[] = "%-16s%04X-%04X %04X-%04X";
static char szBuffer[50];
static HWND hwndButton[NUM];
static RECT rect;
static int cxChar,cyChar;
HDC hdc;
PAINTSTRUCT ps;
int i;
TEXTMETRIC tm;