• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C Strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >re: C Strings (From: Aren Villanueva <email@hidden>)
 >Re: C Strings (From: Stig Brautaset <email@hidden>)

  • Prev by Date: Re: C Strings
  • Next by Date: Re: Installer
  • Previous by thread: Re: C Strings
  • Next by thread: NSConnection; serving a class in-process / crossing thread boundary
  • Index(es):
    • Date
    • Thread