DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

ColoredSlowPrint.cpp

02.01.2008
| 947 views |
  • submit to reddit
        #include <iostream>
#include <ctime> 
#include <cstring>
#include <cstdlib>
#include <windows.h>

using namespace std;

int main()
{
    int i;
    char tmp[124];
    char ar[] = "WARNING: Array Is Getting Filled!";
    strcpy(tmp,ar);
    system("color 1f");
    for(i=0;i<strlen(ar);i++)
    {
        cout << ar[i];
        Sleep(25);
    }
    getchar();
    MessageBox(NULL, tmp, "Good Job!", MB_OK);
    getchar();
}