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 8394713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:07:43+00:00 2026-06-09T20:07:43+00:00

Possible Duplicate: getch is deprecated As title says, what are diffrences between those two

  • 0

Possible Duplicate:
getch is deprecated

As title says, what are diffrences between those two methods? I’m new so I’m confused about the usage of them…

  • 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-09T20:07:45+00:00Added an answer on June 9, 2026 at 8:07 pm

    At least in the implementations of which I’m aware, there’s no difference between the functions themselves. In fact, they’re generally just two different names for exactly the same function.

    As to the reason for having two names: there really isn’t a very good one. Somebody at Microsoft apparently didn’t read the requirements of the standard very carefully, and made some rather…poor decisions based on misunderstanding it.

    First, getch isn’t declared in a standard header, so changing the name isn’t really necessary to start with1. Second, if they did need to change the name, _getch isn’t right anyway — the names reserved for the implementation start with an underscore (they got that much right) followed by either another underscore or a capital letter (which they got wrong). In other words, if they were going to change the name, it should have been either __getch, or _Getch, but at least as far as the standard cares, _getch is just as bad as plain getch.

    As far as choosing between them goes: I’d just use getch and be done with it. Using _getch actually makes your code (marginally) less portable — to do the same thing on most Unixesque systems, you use curses, which includes a function to do (mostly) the same job — and its name is getch. As such, if you ever port your code, you’ll need to change the header(s) you include, but the name getch is one of the few that will actually continue to work. If you’re doing much interactive I/O, you’ll probably have to rewrite quite a bit of other code though.


    1Well, it shouldn’t be anyway. Back in the 16-bit days, Microsoft’s linker had a little problem that you had to pass it an extra switch (/noe) or any duplicate between names you defined, and names defined in a library you were linking would result in an error. So, back then you had to pass an extra switch to get code to link if it used the same name as anything in the library, not just a standard name. That’s pretty much ancient history though.

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

Sidebar

Related Questions

Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: thread with multiple parameters How does one thread a sub with two
Possible Duplicate: What is the difference between a function expression vs declaration in JavaScript?
Possible Duplicate: Opening url in new tab while i am doing window.open(), my page
Possible Duplicate: Difference Between Equals and == in which cases equals() works exactly like
Possible Duplicate: How to successfully rewrite old mysql-php code with deprecated mysql_* functions? I
Possible Duplicate: How to implement getch() function of C in Linux? What is the
Possible Duplicate: Split A4 PDF page into two A5 and back again I have
Possible Duplicate: Create an empty object in JavaScript with {} or new Object()? When
Possible Duplicate: Trying to get tables next to each other horizontal I have two

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.