HI
How can i read a character without pressing the enter key?
HI
How can i read a character without pressing the enter key?
Look at your keyboard?
Quzah.
Hope is the first step on the road to disappointment.
está armado em palhaço!
o gajo é mesmo parvo.
I want to do a scanf without pressing the enter key in the end of the input.
Hmmm. I wonder if this is something that might be in the FAQ? ...
FAQ > How do I... (Level 2) > How can I get input without having the user hit [Enter]?
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Originally Posted by Calavera
i think getch() is what you are looking for.
u can put in something like
and so on....Code:char a[5]; a[0]=getch();
u can try the rest i hope,by the way,i tried this in the borland 6.0 and the borland 3.0 compiler and it worked.
so try it out
Speak english ONLY. And use getch(). There are tons of info on that function, although it isn't part of ANSI C standard or POSIX standard. It's part of the MS console libraries. Include conio.hOriginally Posted by Calavera
Originally Posted by PINGYou mean like the FAQ covers, as it's already been stated.Originally Posted by xErath
Quzah.
Hope is the first step on the road to disappointment.