crtl+D


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers crtl+D
# 1  
Old 09-09-2001
crtl+D

I want to beable to check whether ctrl-d has been pressed in a C++ program under unix. How is ctrl-d represented.

any help would be appreciated.


true
# 2  
Old 09-09-2001
ASCII.... ^D

From ASCII table:

Code:
Oct       Dec       Hex       Char          
------------------------------------   
104       68        44         D
136       94        5E         ^

Hope this helps....
# 3  
Old 09-11-2001
I may be wrong, but I think it may be this line:
Code:
 Oct   Dec   Hex   Char
 --------------------------
  004   4     04     EOT

For future reference, I got this from the ascii man page (helpful little devil, and a lot of people don't even know it exists...)
# 4  
Old 09-11-2001
I found this out thru my professor which is what I was looking for:

ctrl-D at the keyboard is treated as an end of input from the keyboard. I had to check for cin.eof() for the ctrl-d signal.


thanks for your reply,
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparing Data file with Crtl file

Hi, I need to compare a file with its contents matching to that of another file(filename , received date and record count). Lets say has File A original data Ex - 1,abc,1234 2,bcd,4567 3,cde,8901 and File B has details of File A Ex- FILEA.TXT|06/17|2010|3 (filename)|(received... (18 Replies)
Discussion started by: Prashanth B
18 Replies

2. UNIX for Dummies Questions & Answers

^ C = crtl+C ??

Why ^ C stands for crtl+C in ubuntu shell? also on gvim the shortcuts come this way too with weird symbols (like +gP). Where can I find a list of those? (1 Reply)
Discussion started by: frs
1 Replies

3. Shell Programming and Scripting

Enter Crtl+U character in shell script

hi I have some program which accepts "Crtl+U" input, Now i want to run it thorugh my written script ...all other inputs are accepted but how to supply this input. I am supplying input parameters to the program named EX as below. ================================= main.sh . . EX<<EOF... (3 Replies)
Discussion started by: ashish_uiit
3 Replies

4. UNIX for Dummies Questions & Answers

crtl-c not working

hello, After I log into a box I run a small script so my backspace works, but after running the script the ctrl-c will not work anymore to break.. Will work before.. The script I run is below... I am on AIX 5.2. Thanks. set -o vi TMOUT=0 export TERM=xterm export HOST=`hostname` export... (4 Replies)
Discussion started by: benefactr
4 Replies
Login or Register to Ask a Question