Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:04:10+00:00 2026-06-06T19:04:10+00:00

I am making a command-line c++ application and I want text to be on

  • 0

I am making a command-line c++ application and I want text to be on a sort of timer because there is a lot of text. I already know how to make it so they have to press enter, but I want it to be automatic. What would be the simplest way to do this.

Example Output:

Welcome to the Calculator Game!
(1 second later) Do you want to play(Yes or No)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:04:11+00:00Added an answer on June 6, 2026 at 7:04 pm

    The easiest thing is just to use `sleep(milliseconds)’. Most operating systems have varous ways of doing timers as well.

    Even better if you are using C++11, use something like this:

    #include <iostream>
    #include <chrono>
    #include <thread>
    
    int main()
    {
        std::cout << "Hello waiter" << std::endl;
        std::chrono::milliseconds dura( 2000 );
        std::this_thread::sleep_for( dura );
        std::cout << "Waited 2000 ms\n";
    }
    

    If you’re not using C++11, then try the following:

    #include <time.h>
    
    void sleep(unsigned int mseconds)
    {
        clock_t goal = mseconds + clock();
        while (goal > clock());
    }
    

    Docs here: http://en.cppreference.com/w/cpp/thread/sleep_for

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm making sort of SQL command line interface for web-based application. It should
In my application I am making a custom command line. I am looking for
Making my PHP Command line application support Linux and Windows. Currently it has this
I'm making an auto-clicker and I can't find what command line will make the
I'm making a command-line based tool in Java, and I was thinking I might
I am making a command line utility. I need to pass around a few
I was messing around with making a command line parser and was wondering what
I have an application composed of a GUI and 3 launchd daemon launched command-line
I am making a command line program in C using XCode. When running the
Anyone know if it's possible to launch a 64 bit command line from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.