Page 85 - INTRODUCTION_TO_C++_Neat
P. 85

#include<iostream.h>        FILE WRITE OPE
#include<stdio.h>

#include<conio.h>

#include<fstream.h> int
main()

 {
char c,fname[10]; ofstream out;

cout<<"Enter File name:"; cin>>fname;

out.open(fname);
cout<<"Enter contents to store in file (Enter # at end):\n";
while((c=getchar())!='#')

{ out<<c;                }

out.close();
getch(); return 0;

            }
   80   81   82   83   84   85   86