but when I compile the program and type in
a.out -l
the if statement is not shown
what do I need to do to get this if statement working.
the second problem is I have a while loop that displays text via printf and then I use a gets to take in a string. I need the loop to be only broken when ctrl-d is pressed. I have NO idea of how to do this
if anyone has an idea let me know.
thanks
what would I use to get ctrl-d to exit that loop, and where would I use it (exactly) it really has to be around the gets() section, cause that is where the user is prompted for input.
no that is not what I want to do
what I want is the stty (tty) explained how it is used really, cause I need to 'remap' the ^d (Ctrl-d) to exit the while loop.
so if anyone can explain the use of stty for me I would be most greatfull
by explination I would be happy with a small program that does this on it's own so I can see it in action.