Icicle

Group: IceTeks Newbies
Posts: 1
Member No.: 1 142
Joined: 18-January 06
Ice Cubes: 15

|
Hi i was wondering if it is posible for my code (below) to run the Star() function in the background so i can have the moving character and still print text. (p.s if the codes bad im sorry ive only just bin doin c++ for 3 months and im a slow learner lol)
| CODE |
#include <iostream.h> #include <windows.h>
using namespace std;
void printstar(int x,int y,char character) { COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); cout << character; system("cls"); }
void Mvstar(int innerlimit,int outerlimit,int hight,char character) {
int innerlimit2 = innerlimit;
do{ printstar(innerlimit,hight,character); innerlimit++; }while(innerlimit != outerlimit);
do{ printstar(outerlimit,hight,character); outerlimit--; }while(outerlimit != innerlimit2);
}
void Star(int innerlimit,int outerlimit,int hight,char character) { bool star = true; do{ Mvstar(innerlimit,outerlimit,hight,character); }while(star == true); } int main() {
Star(1,75,10,'*'); //innerlimit, outerlimit, hight(depth), character
system("pause"); }
|
|