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

3,749 questions

4,049 answers

114 comments

10,705 users

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

0 votes
33 views
asked 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 by even

Related questions

0 votes
1 answer 27 views
+1 vote
2 answers 579 views
0 votes
1 answer 57 views
0 votes
1 answer 70 views
70 views asked by allison Sr Member (1,490 points)
0 votes
1 answer 81 views
...