control d detection

HELP!!!! In C how do I detect if someone has entered Control-D.

Could someone please give me some code?



Thanx Jeff


Comments

  • : HELP!!!! In C how do I detect if someone has entered Control-D.

    : Could someone please give me some code?

    :

    : Thanx Jeff

    :



    Haven't tried it, but according to this Pocket PC Reference book I have, Ctrl-D is character 4 so would it be possible to use the following?



    int Option;

    Option = getchar();

    if( Option == 4 ) // Do something.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories