diff options
author | Oskar <[email protected]> | 2024-07-29 15:22:18 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-07-29 15:22:18 +0200 |
commit | 7aac5c6dc29079971a5c964762cdb294782b14d5 (patch) | |
tree | f73768958b319ec6f01c32c67f6ee8b3e90f5b75 /1p5p2-example.cpp | |
parent | 5aac3c3f8bcfef0b2aad28d91d87b9ebf1d5e7df (diff) |
more
Diffstat (limited to '1p5p2-example.cpp')
-rw-r--r-- | 1p5p2-example.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/1p5p2-example.cpp b/1p5p2-example.cpp new file mode 100644 index 0000000..53ed4bc --- /dev/null +++ b/1p5p2-example.cpp @@ -0,0 +1,25 @@ +#include <iostream> +#include "sales_item.hpp" + +/* + * + * 1.5.2 example + * + * + */ + +int main() { + + Sales_item item1, item2; + std::cin >> item1 >> item2; + if (item1.isbn() == item2.isbn()) { + std::cout << item1 + item2 << std::endl; + return 0; + } else { + std::cerr << "Data must refer to same ISBN" + << std::endl; + return -1; + } + + return 0; +} |