title: how to delete contents of a file from main body of c++
body: <p>I wanted to know if I can delete the values (string or int) written in a file from main.
  i.e. erase entire data in a text file and make it empty like before
  If yes, how?</p>