2011-11-18 59 views
0

我收到以下錯誤而編譯:答案:C:的「LCD」存儲大小是不知道

 
MenuNavigationApp.c:58: error: array type has incomplete element type 
MenuNavigationApp.c:43: error: storage size of ‘lcd' isn't known 
MenuNavigationApp.c:338: error: too many arguments to function ‘ucSCPowerUp' 

這裏是我的代碼:

int ZealMain() 
{ 
    UCHAR ucStatus; 
    struct DisplaySettings lcd ;      /* line 43 */ 
    UCHAR seq[]={'0','1','2'},ucKey=0; 
    BOOL bStatus; 
    UCHAR ucGetStringBuf[3]; 
    UINT ucGetStringBuf1,uiTimeOut=0; 
    UINT ucGetStringBuf2; 
    lcd.bFullScreen=1; 
    lcd.ucStartPoint=5; 
    lcd.ucEndPoint=50; 
    lcd.bSelectOption=1; 
    lcd.bModeSelect=0; 
    lcd.ucSelectedItem=0; 

    int uitimeout=30; 

    struct FunctionInfo Zealperiph[]={    /* line 58 */ 

     /* Function information array */ 

     {"LCD",1,"0",NULL,NULL}, 
     {"DISPLAY CENTER",2,"00",vLcdDispCenter,NULL}, 
     {"Display CIRCLE",2,"01",vLcdDispCircle,NULL}, 
     /* a lot more of these ... */ 
     {"PRINT DATA",2,"70",vPrintData,NULL}}; 

    ucStatus=ucMenuNavigation("ZEAL INTERACTIVE",Zealperiph,33,0,uiTimeOut,&lcd); 
    if(ucStatus!=1) 
     bLCDDispCenter("Values are Incorrect",TIMES8_13); 
} 

void vPowerUp() 
{ 
    UCHAR ucAtrBuff[50],ucAtrlen,ucStatus; 
    ucSCPowerUp(ucAtrBuff, &ucAtrlen,0x27);  /* line 338 */ 
    vGetCardStatus(); 
} 
+2

你已經包含了定義'DisplaySettings'結構的頭文件嗎? –

回答

1

你在哪兒定義的

struct DisplaySettings lcd?似乎失蹤了。在線號碼爲

1

錯誤。圖43和圖58顯示結構定義超出了其使用的範圍。嘗試檢查它已被定義的地方或使用此結構的extern聲明...並在第338行的錯誤顯示.. ..某些地方你可能已經給出更多的參數bt沒有改變的聲明......提供在我們的代碼..