//************************************************************ //this is the way to open and close file using open() function //************************************************************ #include #include using namespace std; //========================================= int main(){ //creazione stream ofstream book; //associazione file book.open("book",ios::out); //verifica apertura if(!book){ cout<<"Error! opening file not allowed\n!"; return 1; } book<<"File Test for open/close processing\n"; book<