By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

Binary IOStreams

P: n/a
No doubt this is another noobish kinda inquiry but here goes.

Is it possible or even desired to use IOStreams (in my case, out of academic
interest, network sockets) in a binary fashion? Right now it seems as I pull
single elements out of the stream ('>>') I"m not getting white space.

TY
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

<ye**@twenty.net> wrote in message news:tsVYc.56175$jZ5.8187@clgrps13...
No doubt this is another noobish kinda inquiry but here goes.

Is it possible or even desired to use IOStreams (in my case, out of academic

Of course it is.
interest, network sockets) in a binary fashion? Right now it seems as I pull single elements out of the stream ('>>') I"m not getting white space.


Open your stream specifying std::ios::binary.

-Sharad
Jul 22 '05 #2

P: n/a

"Sharad Kala" <no******************@yahoo.com> wrote in message
news:2p************@uni-berlin.de...


Open your stream specifying std::ios::binary.


btw, generally shift operators are used for formatted i/o and different
functions are used for (unformatted) binary input/output.

-Sharad
Jul 22 '05 #3

P: n/a

<ye**@twenty.net> wrote in message news:tsVYc.56175$jZ5.8187@clgrps13...
No doubt this is another noobish kinda inquiry but here goes.

Is it possible or even desired to use IOStreams (in my case, out of academic
interest, network sockets) in a binary fashion? Right now it seems as I pull
single elements out of the stream ('>>') I"m not getting white space.


Use the unformatted i/o functions, such as read and write, rather than the shift
operators.

Jonathan
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.