2
How to make this message flash on screen, stay centered, and how to change the message color?
#include <iostream>
#include <cstdlib>
#include <windows.h>
using namespace std;
string mensagem;
int main(int argc, char *argv[]) {
cout << "Digite um palavara: " ;
cin >> mensagem;
cout << "***************************" "\n";
cout << "***************************" "\n";
cout << "*** ***" "\n";
cout << "*** ***" "\n";
cout<< "***""\t"<<mensagem<<"\t***""\n";
cout << "*** ***" "\n";
cout << "*** ***" "\n";
cout << "***************************" "\n";
cout << "***************************" "\n";
system("PAUSE");
return EXIT_SUCCESS;
}
If by any chance you’re referring to the attribute
BLINK
console text, this is legacy code feature that made use of libconio.h
of the former Borland, now Embarcadero: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devwin32/textattr_xml.html. This functionality comes from formerly widespread VGA modes.– pepper_chico