uhh hey guys
i have some problem in string compare. here's a portion of my code.
here's the what i use to store the identifiers
and here's the execution codeCode:string a[4]; a[0]="if(i==1||i==x)"; a[1]="else if(j==1||j==x)"; a[2]="else if(j==i)"; a[3]="while(x!=20)";
see the problem is that when i compile the program the system is hanged for whatever reason that i don't know. i asked a few friends and they say that the problem is with those codes i posted above. can somebody please tell me what's wrong with the codes??Code:if(a!=NULL) //check if array is empty { for(int j=0; j<4; j++) //compare identifiers with tokens { if(a[j]== tokens[j]) {cout<<a[j];} else {cout<<tokens[j];} }



LinkBack URL
About LinkBacks



. anyway, now i'm having problems to get it to display those identifiers when it is encountered. here's what i've got so far: