出现下列错误了!!!rror C2065: 'Edit' : undeclared identifier C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2109: subscript requires array or pointer type C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2228: left of '.create' must have class/struct/union type C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2065: 'ID' : undeclared identifier C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2661: 'CRect::CRect' : no overloaded function takes 6 parameters C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2143: syntax error : missing ')' before ';' C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(181) : error C2109: subscript requires array or pointer type C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(181) : error C2228: left of '.settext' must have class/struct/union type Error executing cl.exe.kzo494Dlg.obj - 8 error(s), 0 warning(s)
for(int j=0; j<32; j++)
{
edit[i+j].create("test", WS_VISIBLE, CRect(100+i*50, 200, 200+i*100, 300, this, ID+i*32+j); ID 第一个动态按钮的ID.
edit[i+j].settext(a[i][j]);//大概意思
}
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2109: subscript requires array or pointer type
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2228: left of '.create' must have class/struct/union type
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2065: 'ID' : undeclared identifier
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2661: 'CRect::CRect' : no overloaded function takes 6 parameters
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(180) : error C2143: syntax error : missing ')' before ';'
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(181) : error C2109: subscript requires array or pointer type
C:\Documents and Settings\Admin\kzo494\kzo494Dlg.cpp(181) : error C2228: left of '.settext' must have class/struct/union type
Error executing cl.exe.kzo494Dlg.obj - 8 error(s), 0 warning(s)
CEdit edit[32][32];
WORD ID = 1000;
CString str;
for(int i=0; i<32; i++)
for(int j=0; j<32; j++)
{
edit[i][j].Create(WS_VISIBLE, CRect(100+i*50, 200, 200+i*100, 300), this, ID+i*32+j);
//ID 第一个动态按钮的ID.
str.Format("%d",a[i][j]);
edit[i][j].SetDlgItemText(ID+i*32+j, str);