File Stream C++ Tutorial

#include                 
  using namespace std;  
    
  int main(){  
     ofstream outfile("TEST.TXT");  
                                    
     outfile << "test\n";  
     outfile << "1\n";  
     outfile << "2\n";  
     outfile << "3\n";  
     return 0;  
  }