Blinking text with System ("CLS")

Hi everybody!
i am doing a simple C++ program using Dev-C++ in which i want to display a blinking text. i had no idea about it so i went to the net and got this code with System ("CLS"). what happens is that my other outputs are gone and what is left is that text blinking so is there any ideas in which i can make the text blink and not lose my other outputs of the program. thanks


codes:
#include <iostream>
#include <math.h>
#include <cstdlib>
#include <time.h>
#include <conio.h>
#include <stdio.h>

using namespace std;

void wait ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLOCKS_PER_SEC ;
while (clock() < endwait) {}
}

int main(int argc, char** argv) {
int i,j,rd,rd1,num,b,n;
float y[100];
bool blink;

srand (time (NULL));

do {
system("CLS"); //clears the previous output on the screen

cout<<"Process\tArrival\tCPU cycle \n";

for (i=1;i<=5;i++){ //

rd= rand() % 10 + 1; // generating a random number between between 1-10
rd1=rand() % 10 + 1;
cout<<"p"<<i<<"\t"<<rd<<"\t"<<rd1<<"\n\n";
y[i]=rd1;
}
cout<<"{"<<y[1]<<","<<y[2]<<","<<y[3]<<","<<y[4]<<","<<y[5]<<"}";
cout<<"\n\n";
// the processing goes here
cout<<"Process ........";
while (true)
{
if (blink)
cout<<"Processing";
else
system("CLS");
wait(1);
blink = !blink;
}
for (i=1;i<=5;i++){
cout<<"p"<<i<<" ";
for (n=1;n<=y[i];n++){
cout<<"*";
}
cout<<"\n";
}
cout<<"\n";



cout<<"Accept values?\n"<<"if Yes please enter 1 if No please enter 2\n";
cout<<"input: ";
cin>>num;

}while (num==2);


return 0;
}
the blinking code starts here :

while (true)
{
if (blink)
cout<<"Processing";
else
system ("CLS");
wait(1);
blink = !blink;
}

and the text that i want it to blink " processing".
Topic archived. No new replies allowed.