Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <windows.h>
- using namespace std;
- #define WIDTH 80
- #define HEIGHT 22
- int curs(COORD cPos){
- HANDLE hCon;
- hCon = GetStdHandle(STD_OUTPUT_HANDLE);
- SetConsoleCursorPosition(hCon, cPos);
- return 0;
- }
- void dots(int repeats, int x, int y){
- char dots[4]{"..."};
- int k(0), rep(0), m(0);
- curs({ x, y });
- do{
- if (rep > 0 && k == 0){ curs({ x, y }); }
- dots[k] = '.';
- cout << dots[k];
- Sleep(200);
- if (k == 2){
- k = -1;
- curs({ x, y });
- for (m; m <= 2; m++){
- dots[m] = ' '; cout << dots[m]; Sleep(200);
- }
- m = 0;
- rep++;
- }
- k++;
- } while (rep != repeats);
- }
Add Comment
Please, Sign In to add comment