Hi, I was hoping someone could answer this question for me. I got a program that I'm compiling under g++ on UNIX. Im trying to cout some text to the screen that flashes. Can anyone tell me if this is possible?
Thanks for your help.
Printable View
Hi, I was hoping someone could answer this question for me. I got a program that I'm compiling under g++ on UNIX. Im trying to cout some text to the screen that flashes. Can anyone tell me if this is possible?
Thanks for your help.
yes.
the way i do it is [if you have conio.h and dos.h]
Code:--
--
for(i=1;i<10;i++)
{
gotoxy(35,12);
clreol();
cout<<"HELLO WORLD";
delay(200);
gotoxy(35,12);
clreol();
cout<<" ";
delay(100)
}
--
--
there is also a BLINK function in conio.h. i havent used it but you could search for it in your compiler help.
here is one way to do it, and i may be wrong on the /r part of it but i think it is /r. /r returns you to the beginning of the line, IIRC.
this will give you the effect of seeing flashing text five times.Code:
for(int i; i < 5; i++)
{
cout << "text\r";
Sleep(100); //waits one tenth of a second
clrscr();
}
change as you wish
then again i have no idea if this will work under the environment you are looking to use it under.:)
EDIT: i was posting while ishir posted.