Okay so I have fstreams that I swap between output and input. Is there anyway I can tell which openmode the fstream is in?
Jump to Post
Do you want the open mode that was passed to the constructor or open member function? Or do you want to know dynamically whether the last operation was a read or a write?
Ultimately, you'd need to maintain a flag providing this information, which could be stored in the
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.