Sunday, November 17
Loading bar in C++
Since we are high on special effects these days, so below is the code to make a loading bar in C++.
Output is :
#include iostream.h #include conio.h #include windows.h #include dos.h void main() { system("color 0a"); cout<<"\n\n\n\t\t\t\tPlease wait while loading\n\n"; char a=177, b=219; cout<<"\t\t\t\t"; for (int i=0;i<=15;i++) cout<<a; cout<<"\r"; cout<<"\t\t\t\t"; for (int i=0;i<=15;i++) { cout<<b; for (int j=0;j<=1e8;j++); //You can also use sleep function instead of for loop } clrscr(); cout<<"\n\n\n\t\t\tHELLO WORLD\n\n\t\t\tShashka made by Ivan :P"; getch(); }
Output is :
sir koi output bhi post ker dein
ReplyDeleteSir i hope you will not mind of my new post about that loading bar ;; i have refered you in there too for understanding point.... Actually i dont have much ideas but i can make programs ;; i'm sure this wont happen again ; regards usman shery
ReplyDeleteNo problem buddy. This is open community. You can post anything you want. I am happy that you understood the concept and used it to make a program for yourself. What more can I want?
ReplyDeleteKeep making programs like this and you'll have great success.
Sir aur kuch :P
ReplyDelete"Please Don't try This at home"
ReplyDeleteWWE
:D
ReplyDelete:D :D
ReplyDeletehehehe
ReplyDeleteHwaah its work :-:
ReplyDeleteBut there's a several changes i added like:
1.adding using namespace std;
2.change 'void main()' to 'int main()'
3.And i cant add clrscr, cuz its say its not not delcared in this scope
Anyway this is so cool for me that was a beginner XD