To read and write data into file is called filling. Here you
learn how to write data in text file.
First include fstream library.
#include <fstream>
Then in the main function make an object of ofstream and
pass the text file name with extention as a parameter to object like this:
ofstream myfile("items_file.txt");
After that open this file and write data in the file.