home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16455 < prev    next >
Encoding:
Internet Message Format  |  1992-11-13  |  884 b 

  1. Xref: sparky comp.lang.c:16455 comp.lang.c++:16216
  2. Newsgroups: comp.lang.c,comp.lang.c++
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!yhtao
  4. From: yhtao@magnus.acs.ohio-state.edu (Yu-Hui Tao)
  5. Subject: Converting an int or a float into a string*???
  6. Message-ID: <1992Nov13.135058.5330@magnus.acs.ohio-state.edu>
  7. Sender: news@magnus.acs.ohio-state.edu
  8. Nntp-Posting-Host: top.magnus.acs.ohio-state.edu
  9. Organization: The Ohio State University
  10. Date: Fri, 13 Nov 1992 13:50:58 GMT
  11. Lines: 15
  12.  
  13. Hi, netters:
  14.  
  15.    I have an array of numerical numbers of type either int or float. 
  16. What I want is to convert this array into of type char*. For example, 
  17. converting num[0]=1.02 into num[0]="1.02".   
  18.  
  19.    How do I do this in C and C++? Hope this is not too trival!
  20.  
  21.  
  22.    Thanks!
  23.  
  24. Yu-Hui Tao
  25. ISE, OSU
  26. tao@CSEL.eng.ohio-state.edu
  27. ===========================
  28.