delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/30/02:00:55

From: igneous1 AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gotoxy failing
Date: Sun, 30 Jan 2000 04:51:58 GMT
Organization: Deja.com - Before you buy.
Lines: 62
Message-ID: <870g1e$3rl$1@nnrp1.deja.com>
References: <86rd71$isa$1 AT nnrp1 DOT deja DOT com> <q5r39so7if9as61su8o8n72etqfod374cv AT 4ax DOT com>
NNTP-Posting-Host: 4.54.39.109
X-Article-Creation-Date: Sun Jan 30 04:51:58 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
X-Http-Proxy: 1.1 x38.deja.com:80 (Squid/1.1.22) for client 4.54.39.109
X-MyDeja-Info: XMYDJUIDigneous1
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <q5r39so7if9as61su8o8n72etqfod374cv AT 4ax DOT com>,
  REPLYTOd_yerrick AT hotmail DOT comNO2CANNEDHAM wrote:
> On Fri, 28 Jan 2000 06:33:04 GMT, igneous1 AT my-deja DOT com wrote:
>
> >I seem to be having a problem with gotoxy
> >it seems that after the first call to gotoxy
> >all other calls to the function dont work has
> >anybody seen this.
>
> Try doing a
>   fflush(stdout);
>after each gotoxy().
>
>#include <iostream>
#include <conio.h>
#include<cstdio>
using namespace std;

int main()
{
clrscr();
cout<<"Here goes nothing";

gotoxy(1,2);

cout<<"First call will work";
gotoxy(1,3);

cout<<"Second call will not";
return 0;
}
the above program produces  Here goes nothingFirst call will workSecond
call will not

int main()
{
clrscr();
cout<<"Here goes nothing";
fflush(stdout);
gotoxy(1,2);

cout<<"First call will work";
fflush(stdout);
gotoxy(1,3);

cout<<"Second call will not";
return 0;
}

This works but i dont know why i have to use it
i compiled this in DOS without fflush(stdout); with my BC45 and
it work fine.

> Damian Yerrick  http://yerricde.tripod.com/
> Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
> AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
> View full sig: http://www.rose-hulman.edu/~yerricde/sig.html
>


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


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