Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
how to write binary data to stdout?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Irrwahn Grausewitz, post: 1682918"] [email]rouben@pc18.math.umbc.edu[/email] (Rouben Rostamian) wrote: Well, there are two problems: 1) stdout need not be a modifiable lvalue, so you can't just use fopen - you cannot come up with a suitable filename anyway. To solve this, one could come up with reopen( NULL, "wb", stdout); running into problem number 2) It is implementation defined which (if any) and under what circumstances mode changes are permitted. That would be great, but unfortunately it's impossible. stdin, stdout and stderr are text streams per definition, and there is no portable way to switch them to binary mode. I cannot come up with a better solution, sorry. Regards [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
how to write binary data to stdout?
Top