Re: C strings
Re: C strings
- Subject: Re: C strings
- From: Aren Villanueva <email@hidden>
- Date: Wed, 22 Mar 2006 07:50:23 +1100
Ahh, so the most appropriate thing would be to re-define the function
argument to const char. I guess I really should re-read up on my
pointers again.
Aren
On 22/03/2006, at 12:03 AM, Alexander Dymerets wrote:
Aren Villanueva wrote:
dictEntry searchDict(char *searchTerm[])
^^^^^^^^^^^^^
searchTerm is an array of char*
printf("%c %d\n",searchTerm[count2], searchTerm[count2]);
So, searchTerm[count2] is char*, not a char.
I suppose the correct head of you function should be
dictEntry searchDict(const char *searchTerm)
Do you pay attention to the compiler warnings?
_______________________________________________
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
References: | |
| >C strings (From: Aren Villanueva <email@hidden>) |
| >Re: C strings (From: Alexander Dymerets <email@hidden>) |