Home | Forums | Articles | F@H
Help | Search | Members | Calendar | Forum Map | Cybervillage | Archive
Welcome Guest ( Log In | Register | Resend Validation Email )


>  IceTeks Forums -> Technology made cool -> Programming


  Archived - No replies allowed - start new thread insteadStart new topicStart Poll

>  C++ Funtion help
Track this topic | Email this topic | Print this topic
kempy1000
Posted: Jan 18 2006, 05:43 PM
Quote Post

Icicle

Group Icon

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");
}

PMEmail Poster Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Programming | Next Newest »

Topic Options Archived - No replies allowed - start new thread insteadStart new topicStart Poll

 



[ Script Execution time: 0.0355 ]   [ 13 queries used ]   [ GZIP Enabled ]

< Home | Forums | Contact >