title: How do i write to the beginning of the file? C++
body: <p>When I write to the beginning of the file,it always leaves the first line empty,and start writing from the second one.<br>
  How can I make it write from the first line,including the first one and on?<br>
  Thanks.</p>