title: How to clear the content of a file after it is opened using fstream?
body: <p>I need to open a file in read/write mode, read its content and then clear all. So, I cannot open it in truncate mode. How can I do that?</p>