• 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: Stig Brautaset <email@hidden>
  • Date: Tue, 21 Mar 2006 11:42:42 +0000

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: C Strings
      • From: Aren Villanueva <email@hidden>
References: 
 >re: C Strings (From: Aren Villanueva <email@hidden>)

  • Prev by Date: Re: Intercepting messages
  • Next by Date: Re: C Strings
  • Previous by thread: Re: C Strings
  • Next by thread: Re: C Strings
  • Index(es):
    • Date
    • Thread