• 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: const char* to char*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: const char* to char*


  • Subject: Re: const char* to char*
  • From: Prachi Gauriar <email@hidden>
  • Date: Thu, 27 Nov 2003 17:16:38 -0600

On Nov 27, 2003, at 3:59 PM, David Cairns wrote:

hey all --

i am getting this silly warning when compiling in Xcode. The warning comes from the line

char *cName = [theName cString];

how can i work around this such that i avoid this error? would strcpy work?

-- david

As I've mentioned before on this list, the use of cString is discouraged. You should use UTF8String instead.

See <http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSString.html#//apple_ref/doc/uid/20000154/ cString> for more info.

-Prachi
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • status of cString (was const char* to char*)
      • From: "Louis C. Sacha" <email@hidden>
References: 
 >const char* to char* (From: David Cairns <email@hidden>)

  • Prev by Date: NSTableView in NSTabView(Item) update problem
  • Next by Date: Best way to display window?
  • Previous by thread: Re: const char* to char*
  • Next by thread: status of cString (was const char* to char*)
  • Index(es):
    • Date
    • Thread