home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4192 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.2 KB  |  46 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbhp17.rbg.informatik.th-darmstadt.de!rb532
  3. From: rb532@rbhp17.rbg.informatik.th-darmstadt.de ()
  4. Subject: Bug in GCC / OS 2 ??
  5. Sender: news@news.th-darmstadt.de (The Usenet-News System)
  6. Message-ID: <1992Aug13.094911.49327@news.th-darmstadt.de>
  7. Date: Thu, 13 Aug 1992 09:49:11 GMT
  8. Nntp-Posting-Host: rbhp17.rbg.informatik.th-darmstadt.de
  9. Organization: TH Darmstadt
  10. Keywords: GCC
  11. Lines: 33
  12.  
  13. Hi.
  14.  
  15. I have 2 problem.s.
  16.  
  17. The first is one bug of gcc (I think)
  18. I wrote a program like this:
  19.  
  20. include <stdio>;
  21.  
  22. main()
  23. {char c
  24.  
  25.   printf("begin of program");
  26.   do { c = getchar ();
  27.     printf("%d",c)}
  28.    while (c != "X");
  29.   printf("End");
  30. }
  31.  
  32. (perhaps ther are some syntax Errors now, but this doesn't matter)
  33. I compile this program with GCC 2.1.
  34. The result is an executable file.
  35. I run it, and it asks for input, until I press X, and then prints 
  36. "begin of program", then prints the digits, and then prints the "end"
  37. why is this disorder ?
  38.  
  39. The second is that the getch() is not in the library (I get an Error 
  40. when I compile.
  41.  
  42. Is there an updatet lib for gcc 2.1, or how can I use the one from 
  43. OS2 devlopment kit.
  44.  
  45. Thank you
  46.