General discussion

Locked

Use of Ctrl-Z in C++

By rmrodrig ·
In C language, I can stop input by keyboard using Ctrl-Z to indicate finish of input.
How can I indicate the same result using the stream of C++, cin ??

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Use of Ctrl-Z in C++

by Marsh Lion In reply to Use of Ctrl-Z in C++

I presume when you say Ctrl-Z you are talking about the EOF in Windows. Yes you can use cin but note that you may have to check that each caracter that you input is not the EOF.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums