C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers


10,705 users

How can I "reopen" std::cin and std::cout in binary modei c++?

0 votes
asked Jan 4, 2014 by mark

1 Answer

0 votes
Best answer
This is implementation dependent. Check with your compiler's documentation.
For example, suppose you want to do binary I/O using std::cin and std::cout.
Unfortunately there is no standard way to cause std::cin, std::cout, and/or std::cerr to be opened
in binary mode. Closing the streams and attempting to reopen them in binary mode might have
unexpected or undesirable results.
On systems where it makes a difference, the implementation might provide a way to make them
binary streams, but you would have to check the implementation specifics to find out.
answered Jan 4, 2014 by even

Related questions

0 votes
1 answer 26 views
26 views asked Jan 4, 2014 by anna
+1 vote
2 answers 576 views
0 votes
1 answer 57 views
0 votes
1 answer 68 views
68 views asked Jul 20, 2011 by allison Sr Member (1,490 points)
0 votes
1 answer 80 views