Help me guys
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#include<conio.h>
#include<windows.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include <stdio.h>
void loading();
void gotoxy(int x, int y);
int color(int x);
void gotoxy(int x, int y);
int main(){
void loading(){
int c;
for( int x = 0; x <= 100; x++)
{
gotoxy(c,10); printf("%c",219);
gotoxy(40,12); color(10); printf("%d %%",c);
color(15);
c += 3;
Sleep(100);
}
}
system("pause>0");
int main(){
system("cls");
{
HANDLE hConsoleOutput;
COORD dwCursorPosition;
dwCursorPosition.X = x;
dwCursorPosition.Y = y;
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
};
}
int color(int ncolor){
int i=ncolor; // the value of ncolor is the color code
HANDLE ConsoleSettings;
ConsoleSettings=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(ConsoleSettings,i);
}
|
Please help me to fix this code to produce a loading bar needed urgently thanks
Topic archived. No new replies allowed.