From d2d136a5810b8dc233b7a6260531e7fd0c138f3e Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 12 Dec 2020 12:46:18 +0100 Subject: Fixing compilation error on linux VM --- cpp05/ex02/RobotomyRequestForm.hpp | 3 ++- cpp05/ex02/ShrubberyCreationForm.cpp | 7 ++++--- cpp05/ex02/ShrubberyCreationForm.hpp | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'cpp05/ex02') diff --git a/cpp05/ex02/RobotomyRequestForm.hpp b/cpp05/ex02/RobotomyRequestForm.hpp index 9032799..4948570 100644 --- a/cpp05/ex02/RobotomyRequestForm.hpp +++ b/cpp05/ex02/RobotomyRequestForm.hpp @@ -6,13 +6,14 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/10/19 13:43:37 by cacharle #+# #+# */ -/* Updated: 2020/12/12 12:09:37 by cacharle ### ########.fr */ +/* Updated: 2020/12/12 12:46:46 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef ROBOTOMYREQUESTFORM_HPP # define ROBOTOMYREQUESTFORM_HPP +# include # include "Form.hpp" class RobotomyRequestForm : public Form diff --git a/cpp05/ex02/ShrubberyCreationForm.cpp b/cpp05/ex02/ShrubberyCreationForm.cpp index 262f166..ac76272 100644 --- a/cpp05/ex02/ShrubberyCreationForm.cpp +++ b/cpp05/ex02/ShrubberyCreationForm.cpp @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/10/19 13:45:45 by cacharle #+# #+# */ -/* Updated: 2020/11/17 17:15:43 by charles ### ########.fr */ +/* Updated: 2020/12/12 12:45:12 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,10 +29,11 @@ ShrubberyCreationForm::~ShrubberyCreationForm() {} void ShrubberyCreationForm::executeUnsafe() const { - std::ofstream file(m_target + "_shrubbery"); + std::string filename(m_target + "_shrubbery"); + std::ofstream file(filename.c_str()); if (!file.is_open()) { - std::cerr << "Error: " << m_target + "_shrubbery" << ": " << std::strerror(errno) << std::endl; + std::cerr << "Error: " << filename << ": " << std::strerror(errno) << std::endl; return; } file << diff --git a/cpp05/ex02/ShrubberyCreationForm.hpp b/cpp05/ex02/ShrubberyCreationForm.hpp index 7266eb8..dab62f8 100644 --- a/cpp05/ex02/ShrubberyCreationForm.hpp +++ b/cpp05/ex02/ShrubberyCreationForm.hpp @@ -6,13 +6,14 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/10/19 13:43:27 by cacharle #+# #+# */ -/* Updated: 2020/12/12 12:09:51 by cacharle ### ########.fr */ +/* Updated: 2020/12/12 12:44:07 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef SHRUBBERYCREATIONFORM_HPP # define SHRUBBERYCREATIONFORM_HPP +# include # include # include # include -- cgit