summaryrefslogtreecommitdiff
path: root/7p44.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-10-01 19:52:51 +0200
committerOskar <[email protected]>2024-10-01 19:52:51 +0200
commit18236447ae6c08ff336fd22d191343a1ff9dfede (patch)
tree7239de22a78e3ba423af0f1cfe7498f903e8bae3 /7p44.cpp
parente0ffab6b379851aa573d7009fcf50e1be892f734 (diff)
more
Diffstat (limited to '7p44.cpp')
-rw-r--r--7p44.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/7p44.cpp b/7p44.cpp
new file mode 100644
index 0000000..925f7d6
--- /dev/null
+++ b/7p44.cpp
@@ -0,0 +1,30 @@
+#include <iostream>
+#include <vector>
+/*
+ *
+ * 7.44
+ *
+ *
+ */
+
+class NoDefault {
+public:
+ NoDefault(int j): i(j) {}
+ int geti() {return i;}
+private:
+ int i;
+};
+
+class C {
+public:
+ C(): nd(0) { }
+private:
+ NoDefault nd;
+};
+
+int main () {
+
+ //std::vector<NoDefault> vnd(10); // NOT legal
+ std::vector<C> vc(10); // LEGAL
+ return 0;
+}