Re: Long to C-String
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.