int acsmSearch (STATEMACHINE * acsm, char *Tx,int n,int nline){char *T,*Tc;int index;T=Tx;Tc=Tx+n;STATE *s;ACSM_PATTERN *mlist;for (s=acsm->aStateMachine; T < Tc; T++){s = s.aNextState[*T];if( s.MatchList != NULL ){for( mlist=s.MatchList; mlist!=NULL;mlist=mlist->next ){index = T - mlist->num + 1 - Tx;// PrintMatch (mlist,nline,index);fprintf (stdout, "Match KeyWord %s at %d line %d char\n", mlist->pattern,nline,index);}}}return 0;void acsmFree(STATEMACHINE * acsm) //free the momery{ int flag,i=0;STATE * s;s=acsm->aStateMachine;ACSM_PATTERN * mlist, *ilist;for(i=0;i<ALPHABET_SIZE;i++){if(s->aNextState[i]!=ACSM_FAIL_STATE){}哪位高人幫我指點一下 編譯的錯誤為error C2275: 'STATE' : illegal use of this type as an expressiond:\klf\acsm.h(32) : see declaration of 'STATE'error C2065: 's' : undeclared identifiererror C2275: 'ACSM_PATTERN' : illegal use of this type as an expressionsee declaration of 'ACSM_PATTERN'error C2065: 'mlist' : undeclared identifierwarning C4047: '=' : 'int ' differs in levels of indirection from 'struct _state *'error C2224: left of '.aNextState' must have struct/union typeerror C2224: left of '.MatchList' must have struct/union typeerror C2224: left of '.MatchList' must have struct/union typewarning C4047: '!=' : 'int ' differs in levels of indirection from 'void *'error C2223: left of '->next' must point to struct/unionerror C2223: left of '->num' must point to struct/unionerror C2223: left of '->pattern' must point to struct/unionerror C2275: 'ACSM_PATTERN' : illegal use of this type as an expressionsee declaration of 'ACSM_PATTERN'error C2065: 'ilist' : undeclared identifiererror C2100: illegal indirectionwarning C4047: '=' : 'int ' differs in levels of indirection from 'struct _pattern *'error C2223: left of '->nextpattern' must point to struct/unionerror C2100: illegal indirectionwarning C4022: 'AC_FREE' : pointer mismatch for actual parameter 1在頭文件中 我已經定義了 結構體 并且在正文中 把頭文件也包括進去了 前面的程序段 我也有沿用 為什么 到下面就出問題了?
- 2 回答
- 0 關注
- 423 瀏覽
添加回答
舉報
0/150
提交
取消