home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17607 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!navajo!shulick
  3. From: shulick@navajo.ucs.indiana.edu (Sam Hulick)
  4. Subject: Re: wierd sas/c bug
  5. Message-ID: <BzJ0yo.3FE@usenet.ucs.indiana.edu>
  6. Sender: news@usenet.ucs.indiana.edu (USENET News System)
  7. Nntp-Posting-Host: navajo.ucs.indiana.edu
  8. Organization: Vallen Software
  9. References: <BzIw0y.n31@ccu.umanitoba.ca>
  10. Date: Sat, 19 Dec 1992 21:56:48 GMT
  11. Lines: 30
  12.  
  13. In article <BzIw0y.n31@ccu.umanitoba.ca>, umfehr06@ccu.umanitoba.ca (John Fehr) says most sayishly:
  14. >I've been trying to compile an lpmud driver with sas/c, and I've
  15. >come upon a wierd bug...  In my main program file, I have the following
  16. >code:
  17. >
  18. >char master_file = "obj/master";
  19. >
  20. >...
  21. >main() {
  22. >/* bunch of other variables declared */
  23. >    printf("master_file='%s'\n",master_file);
  24. >...
  25. >
  26. >When I compile and run this, I get:
  27. >
  28. >master_file='bj/master'
  29. >
  30. >Has anyone run across this bug?  That printf was the first statement
  31.  
  32. It's not a bug.  Do you know C very well?  Tell me how you expect
  33. master_file to hold an entire string, when it's only a single character.
  34. Try this:
  35.  
  36. char master_file[] = "obj/master";
  37.  
  38. -- 
  39.     // Amiga 3000   ___ \ Sam Hulick: shulick@indiana.edu (NeXTmail OK!)
  40.    // 68030 25 MHz /__/\ \ My opinions wear combat boots.  Or whatever.
  41. \\// OS 2.04       \__\/ / "Walk!  Not bloody likely.  I am going in a
  42.  \/                     / taxi."  --George Bernard Shaw
  43.