home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / c / 13606 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.5 KB

  1. 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]
  2. From: "jeff zeitlin" <jeff.zeitlin@execnet.com>
  3. Newsgroups: comp.lang.c
  4. Subject: int-to-char convert
  5. Message-ID: <199211.798.13133@execnet>
  6. Date: 11 Sep 92 19:18:03 EST
  7. Reply-To: "jeff zeitlin" <jeff.zeitlin@execnet.com>
  8. Distribution: comp
  9. Organization: Executive Networks Information
  10. Lines: 25
  11.  
  12. WS::>I am looking for a function that converts an integer to a string of charact
  13.   ::>e.g converts integer 100 to character string "100". I know that stdlib.h ha
  14.   ::>a function called atoi that does the reverse of this, but I can't find what
  15.   ::>I'm looking for.
  16.  
  17.   This is probably a FAQ, but I'll give a very brief answer anyway.
  18.  
  19.   I don't have my C books handy, but I do know that there is a sprintf
  20.   function that is semantically similar to printf, but writes the
  21.   output to a char array, rather than to stdout.  Try looking at the
  22.   descriptions for this family of functions.  You'll almost certainly
  23.   find it with no trouble.
  24.  
  25.   J/
  26.   jeff.zeitlin@execnet.com
  27.  
  28.   Anything I say in this or any communication to this or any medium
  29.   is strictly my own non-authoritative opinion, unless otherwise
  30.   explicitly noted.  Except for myself, or where explicitly noted
  31.   otherwise, I do not speak for any individual or organization.
  32.  
  33.  * OLX 2.2 * I refuse to have a battle of wits with an unarmed person
  34. --
  35. Executive Network Information System  (914) 667-4567
  36. International ILink Host
  37.