Okay, so I am doing a project for my beginning C++ course, and I'm not
too familiar with file I/O. Here is my code so far.
--------beginning-------
char filename[20];
//user output/input
cout << "please enter the name of a file for output\n";
cout << "(20 character max):";
cin >> filename;
ofstream outStream;
outStream.open(filename);
------end------
how do i write this file as a .txt without causing hell?? is there a
different way I can rewrite this, because when i write this, it just
creates the file as whatever the user inputs, and if I put "" around
the filename, it nullifies the users input....
please help!