C++ ofstream create

Description

C++ ofstream create

#include <iostream> 
#include <fstream> 

using namespace std; 

int main() //from  w  ww .  ja va 2  s.  co  m
{ 
    ofstream outfile("../MyFile.txt"); 
    outfile << "Hi" << endl; 
    outfile.close(); 

    return 0; 
}



PreviousNext

Related