tags:

views:

321

answers:

2

I have a

while(cin >> string)

loop in which I want the user to input a string. However, I do not know how to end the input. I know on *nix machines for bash shell, I can use ctrl-D. But this does not seem to work on cmd.exe for Windows...

Any tips?

[Edit] This is on C++

+3  A: 

The Windows equivalent of Ctrl+D is Ctrl+Z Enter.

RichieHindle
+1  A: 

The end of file character is ctrl-Z in windows

1800 INFORMATION