hwrd
hwrd

Reputation: 2180

End of Line on Windows cmd

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++

Upvotes: 1

Views: 4280

Answers (2)

1800 INFORMATION
1800 INFORMATION

Reputation: 135265

The end of file character is ctrl-Z in windows

Upvotes: 2

RichieHindle
RichieHindle

Reputation: 281415

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

Upvotes: 6

Related Questions