home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!usc!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!rpi!scott.skidmore.edu!psinntp!psinntp!execnet![jeff.zeitlin@execnet.com]
- From: "jeff zeitlin" <jeff.zeitlin@execnet.com>
- Newsgroups: comp.lang.c
- Subject: int-to-char convert
- Message-ID: <199211.798.13133@execnet>
- Date: 11 Sep 92 19:18:03 EST
- Reply-To: "jeff zeitlin" <jeff.zeitlin@execnet.com>
- Distribution: comp
- Organization: Executive Networks Information
- Lines: 25
-
- WS::>I am looking for a function that converts an integer to a string of charact
- ::>e.g converts integer 100 to character string "100". I know that stdlib.h ha
- ::>a function called atoi that does the reverse of this, but I can't find what
- ::>I'm looking for.
-
- This is probably a FAQ, but I'll give a very brief answer anyway.
-
- I don't have my C books handy, but I do know that there is a sprintf
- function that is semantically similar to printf, but writes the
- output to a char array, rather than to stdout. Try looking at the
- descriptions for this family of functions. You'll almost certainly
- find it with no trouble.
-
- J/
- jeff.zeitlin@execnet.com
-
- Anything I say in this or any communication to this or any medium
- is strictly my own non-authoritative opinion, unless otherwise
- explicitly noted. Except for myself, or where explicitly noted
- otherwise, I do not speak for any individual or organization.
-
- * OLX 2.2 * I refuse to have a battle of wits with an unarmed person
- --
- Executive Network Information System (914) 667-4567
- International ILink Host
-