• 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: Long to C-String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long to C-String


  • Subject: Re: Long to C-String
  • From: Kyle Moffett <email@hidden>
  • Date: Wed, 9 Apr 2003 00:31:49 -0400

On Tuesday, Apr 8, 2003, at 00:06 US/Eastern, Julian Barkway wrote:
or even (using bog-standard C):

char fooString [maxlength];
sprintf (fooString, "%d", foo);

Bah! sprintf! Use snprintf!

int foo
char fooString[maxlength];
snprintf(fooString,maxlength,"%d",foo);

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++:- a16 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L+++(++) E W++(+) N+++(++) o? K? w---(-) O? M++ V? PS+() PE+(-) Y+
PGP? t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h! !r-- !y?
------END GEEK CODE BLOCK------
_______________________________________________
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.

References: 
 >Re: Long to C-String (From: Julian Barkway <email@hidden>)

  • Prev by Date: Re: HowTo: server
  • Next by Date: Re: write dictionary to file
  • Previous by thread: Re: Long to C-String
  • Next by thread: Re: Long to C-String
  • Index(es):
    • Date
    • Thread