In this tutorial I will tell you how to make a loading screen in C with my ‘.c’ file.
So for this you will need ‘Loading Screen.c’ which you can get using the link below :
After downloading the file copy it and paste it in C > MinGW > include
The basic code will be :
#include <stdio.h> #include <Loading Screen.c> int main() { return 0; }
Here we have included the ‘Loading Screen.c‘ file.
Now to add a loading screen we will use ‘loading_screen()‘
The parameters are as follows :
No Of Sections | No of Section eg : 10, 20 |
Delay per Section | Delay per Section in milliseconds (1 second = 1000 millisecond) |
Type | Type of the Loading Screen (No Of Section 20 in each)
1] |####################| 2] |====================| 3] |>>>>>>>>>>>>>>>>>>>>| 4] |********************| 5] |——————–| |
X position | X position on the screen |
Y position | Y position on the screen |
Color | Color of the Loading Screen
0] Black 2] Green 4] Blue 6] Cyan 1] Red 3] Yellow 5] Purple 7] White |
Arrow | Arrow while loading.
0]No 1]Yes |
Now you can modify the code like this :
#include <stdio.h> #include <Loading Screen.c> int main() { loading_screen(20, 50, 1, 5, 5, 1, 1); return 0; }
Output :
|####################|
I we put type = 2 and arrow = 1 then the loading screen will be :