#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 to produce a loading bar with percent progress[code
Please correct my code to produce a loading bar!!! needed badly for the part of my project in c++ thanks