diff options
Autocommit at 02.05.2022 @ 07:14
2 files changed, 11 insertions, 0 deletions
| -rw-r--r-- | src/ConsoleInterface/Toolbox.cpp | 6 | ||||
| -rw-r--r-- | src/ConsoleInterface/Toolbox.h | 5 |
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp index 6e67dcb..ccab1b7 100644 --- a/src/ConsoleInterface/Toolbox.cpp +++ b/src/ConsoleInterface/Toolbox.cpp @@ -1,4 +1,10 @@ #include "Toolbox.h" +#include <iostream> + +template <class T> +void read(T* storage) { + std::cin >> storage; +} template <class T> void print(const T* item) { diff --git a/src/ConsoleInterface/Toolbox.h b/src/ConsoleInterface/Toolbox.h index 3ddd283..cf2434e 100644 --- a/src/ConsoleInterface/Toolbox.h +++ b/src/ConsoleInterface/Toolbox.h @@ -1,13 +1,18 @@ #ifndef HEADER_CONSOLEINTERFACE_TOOLBOX #define HEADER_CONSOLEINTERFACE_TOOLBOX +template <class T> +void read(T* storage) { template <class T> void print(const T* item); + template <class T> void printLine(const T* item); + template <class T> void print(const T& item); + template <class T> void printLine(const T& item); |
