Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search
using your subject as the search term gave over 13 million hits:
Google[
^]
The first one looks useful:
http://www.cplusplus.com/doc/tutorial/files/[
^]
As does the second, the third, the fourth...
In future, please try to do at least basic research yourself, and not waste your time or ours.