home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12372 < prev    next >
Encoding:
Internet Message Format  |  1992-08-15  |  1.0 KB

  1. Path: sparky!uunet!gatech!uflorida!mailer.cc.fsu.edu!fsu1.cc.fsu.edu!c3460344
  2. From: c3460344@fsu1.cc.fsu.edu (C3460344)
  3. Newsgroups: comp.lang.c
  4. Subject: Would this be the place to...
  5. Message-ID: <1992Aug8.052246.14904@mailer.cc.fsu.edu>
  6. Date: 15 Aug 92 12:22:55 GMT
  7. Sender: Jeff Blaine
  8. Reply-To: c3460344@fsu1.cc.fsu.edu
  9. Followup-To: ^^^^
  10. Organization: Florida State University
  11. Lines: 21
  12. News-Software: VAX/VMS VNEWS 1.3-4
  13.  
  14. If I have a piece of code that I am having trouble finding a problem in, 
  15. would I post it here?  It is about 50 or so lines...
  16.  
  17. I am getting garbage in the trans_type element of this structure when I 
  18. print it to screen:
  19.  
  20. typedef struct {
  21.        char date[9];
  22.        char cknum[4];
  23.        char comment[21];
  24.        char trans_type[4];
  25.        float amount;
  26. } entry;
  27.  
  28. So, I am assuming that I am lacking some variable initialization.
  29. Please bare with me, I am new to C.  How would I go about initializing an 
  30. array full of these structures (just the trans_type and amount parts, the 
  31. rest is fine)??
  32.  
  33. -=Jeff Blaine
  34. c3460344@fsu1.cc.fsu.edu
  35.