fstream

fstream is used for opening/writing to files in c++. Here is an example

#include <fstream>
 
int main() {
 
    //create file
    ofstream file; // part of the fstream class
 
    // write to a file    
    file.write("hello world!");
 
    // close file
    file.close();
 
}