0

#define ENDFILE "CTRL-Z"

this end the file whenever the user enter CTRL-Z
what i need, i want the user 2 enter CTRL-X to end the program

#define ........ "CTRL-X" ( what could i write here)
so the program end whenever the user press CTRL-X

3
Contributors
3
Replies
4
Views
13 Years
Discussion Span
Last Post by matika
0

#define ENDFILE "CTRL-Z"

You have them enter this text? Or are you meaning a single keystroke? (If you mean a keystroke, I'd guess you're not doing this right.)

what i need, i want the user 2 enter CTRL-X to end the program

#define ........ "CTRL-X" ( what could i write here)
so the program end whenever the user press CTRL-X

If you are trying to intercept keystrokes, you may be interested in signals.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.