Mail Archives: djgpp/1997/06/29/09:06:05
On Sat, 28 Jun 1997, Justin Talbot wrote:
> void main(void)
> {
> printf("Hello world");
> getch();
> }
> The computer waits for me to press a key, then prints "Hello world",
> then ends. The compiler esentially switches the two function calls.
> This also happens if I place two getch()s after the printf() statement,
> except it waits for two key presses before printing "Hello world."
>
> Am I doing something very wrong?
Yes, you are doing something wrong: you don't look in the FAQ before
posting. This question is answered in section 9.4 of the DJGPP FAQ list
(available as v2/faq210b.zip from the same place you get DJGPP).
- Raw text -