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

  • Home
  • SEARCH
  • 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 1107749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:58:51+00:00 2026-05-17T01:58:51+00:00

I took my first ‘fundamentals of programming’ lab session at uni today. One thing

  • 0

I took my first ‘fundamentals of programming’ lab session at uni today. One thing struck me as odd, though: the use of while(! _kbhit()) from conio.h (which I’m sure is a C unit?) to ‘pause’ the console output.

Is this the best way to do this? What do I need to watch out for when using it? Is my tutor absolutely bonkers? I only ask because it seemed like a bit of a dirty hack and I’ve never seen it before in any of the C++ code snippets I’ve looked at.

Marked question as homework because it’s school related, but not actually a homework task. If this question is better off as CW, let me know.

  • 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-05-17T01:58:51+00:00Added an answer on May 17, 2026 at 1:58 am

    A very quick (and easy to remember) way of doing this is to use getchar:

    getchar();
    

    You may have to press Return after entering your char, depending on stdin‘s buffering mode. You can probably use setvbuf to fix that, but personally I just always press Return.

    You may also be using C++ iostreams. In that case, you’ll want to call this somewhere:

    std::ios::sync_with_stdio(true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I took my first step today on working with cloud servers and chosed Amazon
When I took my first programming course in university, we were taught that global
I just took my first baby step today into real scientific computing today when
When I first became interested in programming, I took a class that introduced me
I took a look in the developer's console and saw for the first time
First, I had a problem with getting the data from the Database, it took
First of all a statement: I'm a newbie when it comes to programming for
Now, this might seem fairly simple at first, but took good amount of time
I'm just learning c++ (first day looking at it since I took a 1
I've just took my first steps in mobile development with Titanium Mobile. Coming from

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.