From 93b6d4c65752441c2225266a3f1ab428460a3700 Mon Sep 17 00:00:00 2001 From: Samuel Oberhofer Date: Mon, 23 May 2022 22:07:12 +0200 Subject: [PATCH] Add Ware.cpp --- Uebung 1/Makefile | 2 +- Uebung 1/Ware.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Uebung 1/Ware.cpp diff --git a/Uebung 1/Makefile b/Uebung 1/Makefile index 1ab9b90..f782411 100644 --- a/Uebung 1/Makefile +++ b/Uebung 1/Makefile @@ -4,7 +4,7 @@ BINARY = main # Name of the binary for Release FINAL = prototyp # Object files -OBJS = Sortiment.o main.o +OBJS = Sortiment.o main.o Ware.o # Compiler flags CFLAGS = -Werror -Wall -std=c++17 -fsanitize=address,undefined -g # Linker flags diff --git a/Uebung 1/Ware.cpp b/Uebung 1/Ware.cpp new file mode 100644 index 0000000..5bfd735 --- /dev/null +++ b/Uebung 1/Ware.cpp @@ -0,0 +1,9 @@ +#include "Ware.h" + +std::ostream &operator<<(std::ostream &out, const Ware &ware) { + out << "Name: " << ware.getBezeichnung() << ", SN: " << ware.getSeriennummer() + << ", Gewicht: " << ware.getGewicht() + << ", EK: " << ware.getEinkaufspreis() + << ", VK: " << ware.getVerkaufspreis(); + return out; +} \ No newline at end of file