Add Ware.cpp
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ BINARY = main
|
|||||||
# Name of the binary for Release
|
# Name of the binary for Release
|
||||||
FINAL = prototyp
|
FINAL = prototyp
|
||||||
# Object files
|
# Object files
|
||||||
OBJS = Sortiment.o main.o
|
OBJS = Sortiment.o main.o Ware.o
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
CFLAGS = -Werror -Wall -std=c++17 -fsanitize=address,undefined -g
|
CFLAGS = -Werror -Wall -std=c++17 -fsanitize=address,undefined -g
|
||||||
# Linker flags
|
# Linker flags
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user