integer to string function (itoa())

Loren Petrich loren at tristan.llnl.gov
Sat Jul 14 11:11:35 AEST 1990


In article <22888 at boulder.Colorado.EDU> baileyc at tramp.Colorado.EDU (BAILEY CHRISTOPHER R) writes:
>
>Help, I need an itoa() function for use with my Sun compiler.  It seems
>as if only PC versions of C have itoa functions.  So, source code for
>an integer to string function would be very helpful.  Thanks!

	Use the "sprintf" function -- it is like "printf" or
"fprintf", but it takes the output string as an argument. Check your
system's manual pages for more details.

						        ^    
Loren Petrich, the Master Blaster		     \  ^  /
	loren at sunlight.llnl.gov			      \ ^ /
One may need to route through any of:		       \^/
						<<<<<<<<+>>>>>>>>
	lll-lcc.llnl.gov			       /v\
	lll-crg.llnl.gov			      / v \
	star.stanford.edu			     /  v  \
						        v    
For example, use:
loren%sunlight.llnl.gov at star.stanford.edu

My sister is a Communist for Reagan



More information about the Comp.lang.c mailing list