943,363 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Marked Solved
  • Views: 1836
  • C RSS
Sep 28th, 2004
0

i need sm1 to help me with

Expand Post »
#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
Similar Threads
Reputation Points: 15
Solved Threads: 0
Newbie Poster
matika is offline Offline
19 posts
since May 2004
Sep 28th, 2004
0

Re: i need sm1 to help me with

Are you using the

#ifndef CTRL-X_H
#define CTRL-X_H

#endif
Reputation Points: 10
Solved Threads: 1
Light Poster
coolmel55 is offline Offline
40 posts
since Sep 2004
Sep 28th, 2004
0

Re: i need sm1 to help me with

Quote originally posted by matika ...
#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.)

Quote originally posted by matika ...
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.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Sep 30th, 2004
0

Re: i need sm1 to help me with

hey tnx guys
i fixed the problem
tnx 4 yr effort
Reputation Points: 15
Solved Threads: 0
Newbie Poster
matika is offline Offline
19 posts
since May 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC