954,148 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

i need sm1 to help me with

#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

matika
Newbie Poster
19 posts since May 2004
Reputation Points: 15
Solved Threads: 0
 

Are you using the

#ifndef CTRL-X_H
#define CTRL-X_H

#endif

coolmel55
Light Poster
40 posts since Sep 2004
Reputation Points: 10
Solved Threads: 1
 
#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-XIf you are trying to intercept keystrokes, you may be interested in signals .

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

hey tnx guys
i fixed the problem :D
tnx 4 yr effort

matika
Newbie Poster
19 posts since May 2004
Reputation Points: 15
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You