Re: C Strings
Re: C Strings
- Subject: Re: C Strings
- From: Aren Villanueva <email@hidden>
- Date: Wed, 22 Mar 2006 00:27:18 +1100
Its okay, i fixed it by strcpy-ing the searchTerm into a temporary
char array within the function itself.
Aren
On 21/03/2006, at 10:42 PM, Stig Brautaset wrote:
Aren Villanueva wrote:
printf("%c %d\n", searchTerm[0], searchTerm[0]);
where searchTerm is defined in the function arguments as
char *searchTerm[]
This is a *pointer to* an array of characters; is this really what
you mean? Leave off the [], i.e. make that argument be "char
*searchTerm" and your printf should work.
Stig
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40optusnet.com.au
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden