Reading and writing of files in C++

Masterie 28

For writting files you first need to open it, for that you need a library that’s call “fstream”, that helps to read and write on files. As the example shows, you need to use the function open and put the name of the file with the respective type of file that is (ex. .txt, .jpeg, etc).

And if you want to write on the text you do need to put the name of the file and then put and output and with “” write whatever you want to write.

1111

 

CC BY 4.0 #Masteries – Masterie 28 – A01631728 by luisduartepalacios is licensed under a Creative Commons Attribution 4.0 International License.