In C++, you can specify a mode for a stream in constructor. But in any of the modes you are still allowed to use both text operations (>> int, >> string, getline) and binary data operations (read, write).
Does it make any sense to open file in binary mode and then read it as text, or open file in text mode and then read it as binary? Can you give me an example, where this could be usefull?
You could open a file for output as binary than use the formatted text write operations.
This makes sense when you don't want any "extra" translations applied (such as line endings). This would allow you to output 0x0A for a '\n' on all systems, instead of having some systems outputting 0x0D 0x0A for a '\n'.