home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18603 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.1 KB

  1. Xref: sparky comp.lang.c:18603 comp.unix.bsd:10368
  2. Newsgroups: comp.lang.c,comp.unix.bsd
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!flamingo.ece.cmu.edu!woyansky
  4. From: woyansky@flamingo.ece.cmu.edu (George J. Woyansky)
  5. Subject: Re: Segmentation faults
  6. Message-ID: <BzGHo4.AK9@fs7.ece.cmu.edu>
  7. Originator: woyansky@flamingo.ece.cmu.edu
  8. Sender: news@fs7.ece.cmu.edu (USENET News System)
  9. Reply-To: woyansky@flamingo.ece.cmu.edu (George J. Woyansky)
  10. Organization: Electrical and Computer Engineering, Carnegie Mellon
  11. References:  <1gricmINNsl@ub.d.umn.edu>
  12. Date: Fri, 18 Dec 1992 13:04:50 GMT
  13. Lines: 30
  14.  
  15.  
  16. |> 
  17. |> 
  18. |> Hi,
  19. |>     Why is the following code producing a segmentation fault???
  20. |> I am compiling this code on an Encore Multimax running UMAX 4.3 Unix.
  21. |> Please send replies to CBUSCH@ub.d.umn.edu.
  22. |> 
  23. [OK frags deleted] 
  24. |> 
  25. |> void writexy(x,y,s)
  26. |> {
  27. |>    printf("\33[%d;%dH%s",y,x,s);
  28. |> }
  29. |>    
  30.  
  31.  
  32.  
  33. Hmm.  Maybe here?  You need 
  34. int x,y;
  35. char s[];
  36.  
  37. after your function declaration.
  38.  
  39.  
  40. -George Woyansky
  41.  ECE Dept., Carnegie Mellon University
  42.  Pittsburgh, PA  15213
  43.  
  44.  
  45.