d05 ex02 ok

This commit is contained in:
hugogogo
2022-03-05 15:59:52 +01:00
parent 0a5827f3a1
commit 6c16b9c1d6
11 changed files with 215 additions and 26 deletions

View File

@@ -42,7 +42,8 @@ ShrubberyCreationForm & ShrubberyCreationForm::operator=( ShrubberyCreationForm
*********************************************/
void ShrubberyCreationForm::formAction() const {
std::ofstream ofs("Shrubbery.txt", std::ofstream::out);
std::string name = _target + "_shrubbery";
std::ofstream ofs(name.c_str(), std::ofstream::out);
if (!ofs)
{