Mastery28:: Reading and writing of files in C++

28 

To open o create a file in C++, first you must be sure to add the proper library which is , as you can see, in my example the first command in main is “ofstream file”, that’s to create a file inside your program. Later I name it as Hello.txt, and in there you can put in whatever you want, I just typed in a line that said “Hello dudes”, and that text file will remain with that line unless I erase it. After that you just close your file.

1017

CC BY 4.0 Mastery28:: Reading and writing of files in C++ by Carolina Romo is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.