I'm very unsure about what I'm doing here, the book I'm learning from doesn't give much explaination. Here's the code.
Code:#include <fstream.h> main () { char ch; char filename[20]="a:test.text"; int mode=ios:: out; fstream flout(filename, mode ); cout<<"ready for input:use control-z to end."; cout<<endl; while(cin.get(ch) ) { fout.put( ch );//:confused: } fout.close(); return(0); }