newbie question reguarding safe practice of file io

This is a discussion on newbie question reguarding safe practice of file io within the C++ Programming forums, part of the General Programming Boards category; what im wondering about is can I read files, without worrying about destroying data?
Below is a snippet out of ...

newbie question reguarding safe practice of file io

what im wondering about is can I read files, without worrying about destroying data?

Below is a snippet out of tutorial 10 file io, it says I have too be careful of destroying data, does this account for any type of stream? or is it just input stream that writes too the file?

This will open the file without destroying the current contents and allow you to append new data. When opening files, be very careful not to use them if the file could not be opened. This can be tested for very easily: