المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : كيف استعمل الكيبورد فيC++



thekingofc
25-10-2004, 02:08 AM
الى الاخوه المحترمون رواد هذا المنتدى


كيف استعمل الكيبورد في لغة c++ او الازرار عموما :أفكر:


ارجوممن لديه المعرفه الاجابة على سوالي :)

amgadpasha
25-10-2004, 05:14 PM
do you need to read text or use the buttons for for something else, like gaming or moving a cursor
for text or charcters input use "cin" and for other functions u can
use "getche()" or "getch()".. if u need further info drop a line

thekingofc
26-10-2004, 04:55 PM
Dear Amgadpasha

I wanted to use keys for gaming but the problem is I was not able to use getch in my program.:06:

May be I need to continue my studying in C++

Thank you for your care and reply :)

THE LION
26-10-2004, 05:05 PM
Well, Hi at first...

I don't know C++ but I can help you with some stuff. at first if you want to asign keys for gaming (or any other program) you should call the char variabels (the keys) and then you should make a procedure(if you want to make it easier on you and less lines) and you should put the command getch() in the procedure and then a CASE or IF dicision.

then you should put the procedure in the right place within the main function.




Note : you should use ASCII codes to make the char varibels= keys "Like the arrows"

If you want the whole ASCII codes ,just say it.