diff options
Diffstat (limited to 'oop1w5/StringWeek5.hpp')
-rw-r--r-- | oop1w5/StringWeek5.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oop1w5/StringWeek5.hpp b/oop1w5/StringWeek5.hpp new file mode 100644 index 0000000..ed71e75 --- /dev/null +++ b/oop1w5/StringWeek5.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "StringWeek5.h" +#include <string> + +template <typename T> +void StringWeek5::add(const T& value) { + std::stringstream value_str(""); + value_str << value; + this->text.append(value_str.str()); +} + |