Mail Archives: djgpp/2000/01/30/02:00:55
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 -