Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple stdin problem

Status
Not open for further replies.

bobetko

Programmer
Jan 14, 2003
155
US
I am reading from stdin and when I get prompt I don't know how to get out of it. The while loop goes until end-of-file. So, question is what do I type on the keyboard to say: "I am done". I have tried <enter> and all other kind of keyboard combinations and nothing works.

Code:
...
while ((k = fread(mybuf, sizeof(char), bsize, input)) > 0) {
    fwrite (mybuf, sizeof(char), k, output);
}
...

Thanks.
 
Ctrl-Z (plus Enter) on Windows.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top