#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 below[code]
Line 20: Your functions need to begin and end with {}
Line 33: Remove the ; after main()
Line 34: Missing {} for main
Line 37, 40: You have {, but no }
Line 41, 42: x and y are undefined. Are lines 39-44 supposed to be a function?
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.
Hint: You can edit your previous post, highlight you code and press the <> formatting button.