CyberCodes
C++ string color with blink Welcome

Reminders sa mga rehistradong myembro:

•ang lengwahe na gagamitin ay pawang english at tagalog lamang

•Bawal po dito ang pakikipag away

•Bawal ang mga shorcut na mga words
Example: txt, Pwd, at iba pa

•Bawal mababastos at masasakit na salita o anu mang makakasakit
ng damdamin ng isang myembro ng forum na ito

•use the "like" button if the post of the following user you think are usefull



Join the forum, it's quick and easy

CyberCodes
C++ string color with blink Welcome

Reminders sa mga rehistradong myembro:

•ang lengwahe na gagamitin ay pawang english at tagalog lamang

•Bawal po dito ang pakikipag away

•Bawal ang mga shorcut na mga words
Example: txt, Pwd, at iba pa

•Bawal mababastos at masasakit na salita o anu mang makakasakit
ng damdamin ng isang myembro ng forum na ito

•use the "like" button if the post of the following user you think are usefull

CyberCodes
Would you like to react to this message? Create an account in a few clicks or log in to continue.

C++ string color with blink

Go down

C++ string color with blink Empty C++ string color with blink

Post by princeterror Thu Nov 22, 2012 4:48 pm

#include
#include
using namespace std;
void gotoxy (int x, int y);

int main()
{
HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 2); // 2 means color Green. You can set your color code on your own likings.

while (true)
{
gotoxy(0,0);
cout<< "Jovie Jr. R Ticar (BSIT 1)";
Sleep(1000);
gotoxy(0,0);
system("cls");
Sleep(500);
}
cin.get(); // wait
return 0;
}

void gotoxy (int x, int y)
{
COORD coord;
coord.X = x; coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
princeterror
princeterror
Universal Moderator
Universal Moderator

Posts : 272
Credits : 11465
Fame : 81
Join date : 2012-06-07
Age : 33

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum