getch() source?

Jul 17, 2009 at 10:43pm
Ok, Heres the deal, I am in need of the getch() source for rewriting it as a template. I will not go into details of the purpose of this code rewrite for it is not important. But for the sake of logic I will say that I am programming an ai, and I need a custom getch() function.

I've searched endlessly for the source from within my <header> files as well as the internet and I've not found it yet.

If anyone can supply this for me, it would be greatly appreciated, and I can continue work on my AI. Please and thanks, and if no replies, I apologize if I've broken any rules here.
Jul 18, 2009 at 12:03am
closed account (S6k9GNh0)
It's not in the headers. You can use getch() without any headers.
Jul 18, 2009 at 12:09am
Two things:
1. You're heading down the wrong path if your AI depends directly on the input method.
2. getch() is not a standard function, which means everyone implements it however they like. It's also part of the obsolete conio.h. If you want to take a look at an open source implementation, there's Ncurses and PDcurses. I doubt reading either of them will be easy for you.
Jul 18, 2009 at 3:26am
>Helios

1. It's not, I need(ed) it for an experimental function of the AI's data bank IO.

2. I realized this just after posting but was too busy to edit it. Sorry, as is my norm, I've gone a few days without sleep and I'm slightly out of it.

But thank you for the references. I understand you're concern with my ability to read them but, I'll look into them none the less.
Topic archived. No new replies allowed.