diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-12-12 12:46:18 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-12-12 12:46:59 +0100 |
| commit | d2d136a5810b8dc233b7a6260531e7fd0c138f3e (patch) | |
| tree | 3a812a1aaeda50a6b6738a079997cdcd5a7b7ab2 /cpp05/ex02 | |
| parent | 0071b1e944cbce91ff6ff8e235280c3955ce1d5b (diff) | |
| download | piscine_cpp-d2d136a5810b8dc233b7a6260531e7fd0c138f3e.tar.gz piscine_cpp-d2d136a5810b8dc233b7a6260531e7fd0c138f3e.tar.bz2 piscine_cpp-d2d136a5810b8dc233b7a6260531e7fd0c138f3e.zip | |
Fixing compilation error on linux VM
Diffstat (limited to 'cpp05/ex02')
| -rw-r--r-- | cpp05/ex02/RobotomyRequestForm.hpp | 3 | ||||
| -rw-r--r-- | cpp05/ex02/ShrubberyCreationForm.cpp | 7 | ||||
| -rw-r--r-- | cpp05/ex02/ShrubberyCreationForm.hpp | 3 |
3 files changed, 8 insertions, 5 deletions
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 <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <cstdlib> # 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 <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <cerrno> # include <string> # include <cstring> # include <fstream> |
