1. Pinoy Hideout is the Ultimate Pinoy Chat, Mobile and PC Community
    We have been leading the scene for over 7 years and currently offer:
    • latest and updated game cheats and softwares
    • internet tricks for your android phone, mobile network, and computer
    • a staff team who helps protect its members from malware while enforcing a great community

    • You must register an account before you can post, download files, and see any advanced features or content.

  2. How to avail PHO VIP hack/s?
    Click here for more Info!
    [PHO] VIP Hacks Price

      SF1 VIP|ROS VIP

    • 7 Days = php 150
    • 15 Days = php 200
    • 1 Month = php 300

      SF2 VIP

    • 7 Days = php 200
    • 15 Days = php 250
    • 1 Month = php 500
    Dismiss Notice
Dismiss Notice
Announcement!
Gusto mo bang makakuha ng VIP subcription ng libre? CLICK HERE<

Source C++ CMD Loading Screen

Discussion in 'C and C++' started by killovehack123, Oct 7, 2019.

  1. killovehack123

    Reputations:
    20
    Joined:
    Feb 14, 2019
    Posts:
    15
    Likes Received:
    4
    Trophy Points:
    3

    Code:
    #include <stdio.h>
    #include <string.h>
    #include <windows.h>
    
    #define PROGRESS_BAR_WIDTH 30
    #define LOADING_TIME_SECONDS 10
    
    int main()
    {
            char progress_bar[PROGRESS_BAR_WIDTH + 1] ;
            int progress_level = 0 ;
            int percent ;
    
            /* Initialise progress bar string */
            memset( progress_bar, '-', PROGRESS_BAR_WIDTH ) ;
            progress_bar[PROGRESS_BAR_WIDTH] = '\0' ;
    
            /* for 0 to 100%... */
            for( percent = 0; percent <= 100; percent++ )
            {
                    /* Calculate progress bar level, and modify string */
                    progress_level = (percent * PROGRESS_BAR_WIDTH) / 100 ;
                    memset( progress_bar, '#', progress_level ) ;
    
                    /* return cursor to start of line and display bar */
                    printf( "\r%s(%d%%)", progress_bar, percent ) ;
                    Sleep( LOADING_TIME_SECONDS * 10 ) ;
            }
            return 0;
    }  
     

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Share This Page

Pinoy Hideout