Discussion:
conio.h kbhit() and getch()
(too old to reply)
s***@somedomain.com.invalid
2004-10-26 18:21:56 UTC
Permalink
hello

i am making a game for my final project in a C based class and i need keyboard input. we use jGRASP in class for our editor but it doesnt include conio.h or conio.c in the release.... can anyone send me these files for win32 or show me another way to get keyboard input? (please be thorough)

thanks,
jon / veg
Thomas Matthews
2004-10-26 18:45:32 UTC
Permalink
Post by s***@somedomain.com.invalid
hello
i am making a game for my final project in a C based class and i need keyboard input.
Stop right there. The C and C++ languages have no concept of
keyboards. There is no method for obtaining direct input
from a keyboard. These languages can obtain input from
a stream, what ever that is connected to.

Also, perhaps you may want to review your English capitalization
rules.
Post by s***@somedomain.com.invalid
we use jGRASP in class for our editor but it doesnt include conio.h or conio.c in the release....
The C and C++ languages don't have a jGRASP, or conio class.
Perhaps consulting the newsgroups for your compiler and platform
would shed some light on this subject.

Read the FAQs and welcome text below in my signature.
Post by s***@somedomain.com.invalid
can anyone send me these files for win32 or show me another way to get keyboard input? (please be thorough)
Yes, the folks at the Win32 newsgroups can.
Post by s***@somedomain.com.invalid
thanks,
jon / veg
[Background]
Many platforms do not have keyboards connected to them.
For example a vending machine or a microwave oven.
Another is a dishwasher. These platforms can run C
or C++ without having a keyboard. Just remember that
not everybody uses a Windows machine, Linux, Unix,
Vax, embedded controller, etc.
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
s***@somedomain.com.invalid
2004-10-28 04:19:13 UTC
Permalink
u were absolutely no help
obviously, whether thru a stream or what not, c can obtain keyboard input -- who cares if its direct or not.

conio is a package included with borland, but not part of standard C, therefore, jGrasp doesnt include it and i cant use them -- WHICH IS WHY I NEEDED THE FILES

capitalization is for papers, not newsgroup posts.

mmkthnx.
B. v Ingen Schenau
2004-10-28 18:51:52 UTC
Permalink
Post by s***@somedomain.com.invalid
u were absolutely no help
obviously, whether thru a stream or what not, c can obtain keyboard
input -- who cares if its direct or not.
conio is a package included with borland, but not part of standard C,
therefore, jGrasp doesnt include it and i cant use them -- WHICH IS
WHY I NEEDED THE FILES
Then you will have to ask Borland very nicely if they are willing to
send you the sources for their conio package.
But don't get your hopes up. Borland might not be willing to give away
those sources, and even if they do, the implementation of conio is most
likely not done in C.

Your best bet is to ask in a group for jGrasp which methods their
compiler provides to you for direct access to a keyboard.
Post by s***@somedomain.com.invalid
capitalization is for papers, not newsgroup posts.
mmkthnx.
Bart v Ingen Schenau
--
a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq
c.l.c FAQ: http://www.eskimo.com/~scs/C-faq/top.html
c.l.c++ FAQ: http://www.parashift.com/c++-faq-lite/
Watson Davis
2004-10-28 20:08:56 UTC
Permalink
Post by s***@somedomain.com.invalid
u were absolutely no help
obviously, whether thru a stream or what not, c can obtain keyboard
input -- who cares if its direct or not.
conio is a package included with borland, but not part of standard C,
therefore, jGrasp doesnt include it and i cant use them -- WHICH IS
WHY I NEEDED THE FILES
capitalization is for papers, not newsgroup posts.
mmkthnx.
I'm not a regular on this group or anything but...

There are a lot of people who might be able to help you that won't after a
message like this. Nobody owes you help. If anyone answers, it's out of
the kindness of their heart. If you act like a jerk-off, well... that's
not a very good strategy if your goal is to get assistance.

Just so you know in the future.

Oh, and do your own damn homework.

Watson (the pencil neck) Davis
Larry Barowski
2004-10-28 19:48:47 UTC
Permalink
Post by s***@somedomain.com.invalid
hello
i am making a game for my final project in a C based class and i need
keyboard input. we use jGRASP in class for our editor but it doesnt include
conio.h or conio.c in the release.... can anyone send me these files for
win32 or show me another way to get keyboard input? (please be thorough)
jGRASP is set up to work with the Cygwin compilers by default,
but it can also work with the Borland compiler. Look at
"Settings" / "Compiler Settings" / "Whatever" - choose language
"C". There is an environment for "Borland BCC 5.5 - Windows".

But since this is for a class, they may want you to write portable
code. If that is the case, you can't get keyboard input in the
sense of "key pressed", "key released", etc. If the program is
used interactively, you can't expect any better than line input
(no input until the user hits "enter", or similar).
s***@somedomain.com.invalid
2004-10-29 04:22:48 UTC
Permalink
.. you guys are awesome.

i never asked for someone to do my home work and i never said i was gonna beg for replies on a far-off newsgroup either. he read it and replied out of his own "kindness" (har har).

my request was completely legitimate.

nevertheless, this post will be laid to rest.

thnx anyway.
s***@somedomain.com.invalid
2004-10-29 04:26:22 UTC
Permalink
the previous post is not meant for Bart or Larry, they were helpful. thank you for that =).
Continue reading on narkive:
Loading...