home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 947 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  55 lines

  1. Path: su3.in.net!news
  2. From: mave@in.net (John J. Maver, Jr.)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Help with an easy C issue.
  5. Date: 13 Jan 1996 02:30:59 GMT
  6. Organization: INTERNET Indiana
  7. Message-ID: <737.6585T1284T2078@in.net>
  8. Reply-To: mave@in.net
  9. NNTP-Posting-Host: pm3-26.in.net
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  
  13.     This is going to be rediculously easy to solve.  thanks  in advance!!
  14.  
  15.     I have a value entered as a string like,
  16.  
  17.     char *mystring;
  18.  
  19.     printf("Enter your age>");
  20.     scanf("%s",&mystring);
  21.  
  22.     Now I want it to be an int, so:
  23.  
  24.     myint=atoi(mystring);
  25.  
  26.     I mess around with the int:
  27.  
  28.     myint=myint+10;
  29.  
  30.     And I want to turn myint back into a string.
  31.  
  32.     HOW???
  33.  
  34.  
  35.     I am writing a small GUI-based prog that has a string gadget and a text
  36. gadget.  I want to be able to take an integer from the string-gad, change it,
  37. and then put the answer in the text-gad.
  38.  
  39.  
  40.     Thank you,
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. --
  50. <tsb> John J. Maver, Jr.
  51. <sb> mave@in.net
  52. <sb> A4000/040
  53. Pride invites calamity; humility reaps its harvest.
  54.  
  55.