看板 EE_DSnP 關於我們 聯絡資訊
我把改過的程式碼貼在這裡 char *const* clearScreen(char [][NUM_COLUMN]); char*const * (*move[4])(char[][NUM_COLUMN],int , int)={downLeft,downRight,upRight,upLeft}; char*const * downLeft(char[][NUM_COLUMN],int, int); char*const * downRight(char[][NUM_COLUMN],int, int); char*const * upLeft(char[][NUM_COLUMN],int, int); char*const * upRight(char [][NUM_COLUMN],int ,int); ...... char*const * downRight(char a[][NUM_COLUMN],int x,int y){ //for DR move extern char**screen; if(a[x][y+1]=0){ //If the string comes to an end clearScreen(screen[][NUM_COLUMN]); a[x+1][y+1]=a[x][y]; a[x+1][y+2]=0; } } //end error message: F:\黃鐘揚\homework6\1\addSpace3.h In function `char* const* downRight(char (*)[80], int, int)': 37 F:\黃鐘揚\homework6\1\addSpace3.h expected primary-expression before ']' token -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.239.58
ric2k1:呼叫 clearScreen 為什麼傳入 screen[][NUM_COLUMN] 呢? 12/02 23:57
ric2k1:傳 screen 就好了吧? 請 review 一下 lecture note #4... 12/02 23:57
james0419:那老師關於return type 要怎麼寫? 12/03 11:08