diff options
[SDP/P] Only direct subboxes are removed in third exercise
1 files changed, 23 insertions, 0 deletions
| -rw-r--r-- | Year 2/Structures and data algorithms/Project/exc/Box.h | 23 |
diff --git a/Year 2/Structures and data algorithms/Project/exc/Box.h b/Year 2/Structures and data algorithms/Project/exc/Box.h new file mode 100644 index 0000000..2a0c71b --- /dev/null +++ b/Year 2/Structures and data algorithms/Project/exc/Box.h @@ -0,0 +1,23 @@ +#ifndef BOX +#define BOX + +#include <string> +#include <vector> +#include <ostream> +#include <istream> + +class Box { + std::string name; + std::vector<std::string> items; + std::vector<Box*> subboxes; + + std::ostream& printWithInd(std::ostream&, std::string); + +public: + Box(const std::string& name, const std::vector<std::string>& items, const std::vector<Box*> subboxes) : name(name), items(items), subboxes(subboxes) {} + + void removeUselessSubBoxes(); + std::ostream& print(std::ostream&); +}; + +#endif |
