www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/02/11:02:07

From: lsantil AT calstatela DOT edu
Date: Tue, 2 Jun 1998 07:59:50 -0700 (PDT)
Message-Id: <199806021459.HAA06099@neptune.calstatela.edu>
To: djgpp AT delorie DOT com
Subject: Re: Gotoxy() Malfunction

>
>I'm starting to write short C programs with the djgpp compiler and i've
>found that gotoxy() function doesn't work well.
>
>After compiling the source code I execute it and :
>
>-The cursor's position isn't as I wrote or
>-The cursor's position is O.K. but the printf() function I wrote doesn't
>appear. After quiting the program I press Alt+F5 and what a surprise that
>all sentences wroten (write) appear at the bottom of the screen.
>
>Is it a problem based on my computer? My CPU features are:

No, it has to do with the fact that stdio is line buffered. Try this:

gotoxy(x,y);
printf("x"): // or even cout << "x"; but you still need stdio.h for fflush();
fflush(stdio); // Flushes screen buffer; makes sure all printfs are printed

>
>Intel Pentium 233 MMX
>32Mb EDO RAM
>SVGA Matrox Mystique 170 DAC 2Mb VRAM
>Windows 95. (I use Djgpp with F8 Only System Symbol)
>MotherBoard TomatoBoard (What a name!!!!) 5STX With Intel 430 TX Chipset.
>
>Please answer to me!!!
>
>My E-Mail adress is :  405455 AT ingtz DOT unizar DOT es
>
>Sorry for my English. Happy Day
>
>     webmaster   donations     Please do not mirror or bulk download this
>   site
>     Copyright © 1997   by DJ Delorie     Updated May 1997   
>   
>                             Powered by Apache!
>                                      
>      You can help support this site by visiting the advertisers that
>                                sponsor it!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019