From 0e9be940d16311036ee36aed47406481a26fdd82 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 27 Dec 2022 12:36:09 +0200 Subject: [SDP/P] Only direct subboxes are removed in third exercise --- .../Project/exc/Box.h | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Year 2/Structures and data algorithms/Project/exc/Box.h (limited to 'Year 2/Structures and data algorithms/Project/exc/Box.h') 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 +#include +#include +#include + +class Box { + std::string name; + std::vector items; + std::vector subboxes; + + std::ostream& printWithInd(std::ostream&, std::string); + +public: + Box(const std::string& name, const std::vector& items, const std::vector subboxes) : name(name), items(items), subboxes(subboxes) {} + + void removeUselessSubBoxes(); + std::ostream& print(std::ostream&); +}; + +#endif -- cgit v1.3.1-26-gb76a