Hi all.
Just a quick question for anyone who might know. Is there any way of setting up the entering of a character or number without having to press the return key after? For all options i input into my program when i run it i always have to press the return key after. I was just wondering if it was possible to have it so when the character or number is entered it automaticaly carries on without pressing the return key. It would help improve my program.
Thanks everyone :)
robski
0
Newbie Poster
Recommended Answers
Jump to PostThere is no standard C or C++ way to do that. There are a couple non-standards methods, depending on the operating system. For MS-Windows compilers you might look to see if your compiler supports conio.h. It has functions such as kbhit() that checks to see if something is available at …
Jump to PostAnd it's not dependent on the operating system. It depends on the compiler.
Pick on AD day ??? It will actually depend both on OS and compiler. AFAIK *nix can't support the functions in conio.h, but I suppose someone could write a vt100 version or one that uses termcap.
All 5 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
TEDickey
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.