Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Animation.cpp : Defines the entry point for the console application.
- //Brandon Foley
- #include "stdafx.h"
- #include <windows.h>
- #include <iostream>
- #include <conio.h>
- #include <iomanip>
- #define BRIGHT 1
- #define RED 31
- #define BG_BLACK 40
- using namespace std;
- void gotoxy()
- {
- printf("Hello", 0x1B, BRIGHT, RED, BG_BLACK);
- }
- int main()
- {
- HANDLE hConsole;
- hColnsole = GetStdHandle(STD_OUTPUT_HADNLE);
- printf("HELLO\n");
- while (counter >= 0)
- {
- for (int z = 0;; z++)
- {
- for (int x = 0; x <= 10; x++)
- {
- SetConsoleTextAttribute(hConsole, i);
- cout << setw(x + 60) << "|-----------------|" << endl;
- cout << setw(60 - x) << "|-----------------|" << endl;
- Sleep(15);
- }
- for (int y = 10; y >= 0; y--)
- {
- cout << setw(y + 60) << "|-----------------|" << endl;
- cout << setw(60 - y) << "|-----------------|" << endl;
- Sleep(15);
- }
- }
- counter--;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment