|
From: | Adam Fedor |
Subject: | Re: Wrapping a C library |
Date: | Wed, 2 Feb 2005 11:42:22 -0700 |
On Feb 2, 2005, at 8:09 AM, Graham J Lee wrote:
if(!strcasecmp(input,"define")) { struct ld_defanswer **d; printf("Define word: "); fgets(arg1,BUFSIZ,stdin); arg1[strlen(arg1)-1]='\0'; a1=[NSString stringWithCString:arg1]; d=[da define:a1]; if(d==NULL) { printf("No results for '%s'\n",arg1); } else { while(d[i]!=NULL) { printf("Got HERE too, d[i]=%d\n",d[i]); printf("Found definition:\n%s\n",d[i]->ld_ansdef); i++; } } continue;
It doesn't appear that you ever set i = 0 anywhere, although perhaps you did not show this.
[Prev in Thread] | Current Thread | [Next in Thread] |