Jump to content

Copy stdin to stdout: Difference between revisions

no edit summary
No edit summary
Line 74:
std::cout << std::cin.rdbuf();
}</lang>
 
=={{header|Common Lisp}}==
<lang lisp>#|Loops while reading and collecting characters from STDIN until EOF (C-Z or C-D)
Then concatenates the characters into a string|#
(format t
(concatenate 'string
(loop for x = (read-char *query-io*) until (or (char= x #\Sub) (char= x #\Eot)) collecting x)))
</lang>
 
=={{header|D}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.