Add Ware.cpp

This commit is contained in:
Samuel Oberhofer 2022-05-23 22:07:12 +02:00
parent 8282ffdcf1
commit 93b6d4c657
2 changed files with 10 additions and 1 deletions

View File

@ -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

9
Uebung 1/Ware.cpp Normal file
View File

@ -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;
}