Web Development

General discussion


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.

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.

Related Discussions

Related Forums