From c2d59bb8a75c6228a91393b9cf3aedcb4d455218 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sat, 28 Sep 2024 11:18:41 +0200 Subject: more --- 7p37.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 7p37.cpp (limited to '7p37.cpp') diff --git a/7p37.cpp b/7p37.cpp new file mode 100644 index 0000000..6a46131 --- /dev/null +++ b/7p37.cpp @@ -0,0 +1,32 @@ + +/* + * + * 7.37 + * + * + */ + +/* +class Sales_data { +public: + // defines the default constructor as well as one that takes a string argument + Sales_data(std::string s = ""): bookNo(s) { } + // remaining constructors unchanged + Sales_data(std::string s, unsigned cnt, double rev): + bookNo(s), units_sold(cnt), revenue(rev*cnt) { } + Sales_data(std::istream &is) { read(is, *this); } + // remaining members as before +}; +*/ + +/* + Sales_data first_item(cin); // Sales_data(std::istream &is) { read(is, *this); } + int main() { + Sales_data next; // Sales_data(std::string s = ""): bookNo(s) { } + Sales_data last("9-999-99999-9"); // Sales_data(std::string s = ""): bookNo(s) { } +} + */ + +int main () { + return 0; +} -- cgit v1.2.3