getchar() problem

HI, I'm doing a unix programming. However, i get problem when I try to read some input from keyboard. I use "getchar()" to do it, however, the programming is justing waiting there until somebody key in something. Is there a way to periodly check if there is any key-input in the input-buffer. If there is, then read the key. If not, continue to wait. I have do this in DOS. However, I don't know how to do it in UNIX.

In Unix this problem is a little bit complicated. You have to use ioctl and
the read function. Use your manual, and if you are interessted in a programm
working with this send an email to rbr@physik.kfunigraz.ac.at. I'll send you
a demo program.

Featured Post

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008. These same feature are in the MFC libraries that come with Visual …

Introduction:
Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers. The PreTranslateMessage function is to be used to intercept and respond to keyboard events.
Continuing from the fourth article about sudoku. …

In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…