Nov 9, 2020 at 2:20pm
You need to pass the name entered by the user to the file function.
1 2 3 4 5 6 7 8
|
int main() {
std::string filename;
std::cout << "Enter file name: ";
std::getline(std::cin, filename);
std::fstream filestream(filename. std::ios::app);
if (!fiestream) std::clog << "cannot open " << filename
}
|
Last edited on Nov 9, 2020 at 2:21pm