summaryrefslogtreecommitdiff
path: root/6p2.cpp
diff options
context:
space:
mode:
Diffstat (limited to '6p2.cpp')
-rw-r--r--6p2.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/6p2.cpp b/6p2.cpp
new file mode 100644
index 0000000..1791977
--- /dev/null
+++ b/6p2.cpp
@@ -0,0 +1,35 @@
+
+/*
+ *
+ * 6.2
+ *
+ *
+ */
+
+int main () {
+
+ /* Corrected versions
+
+ (a)
+ string f() {
+ string s;
+ // . . .
+ return s;
+ }
+
+ (b)
+ void f2(int i) { }
+
+ (c)
+ int calc(int v1, int v2) {
+
+ return v1 + v2;
+ }
+
+ (d)
+ double square(double x) {
+ return x * x;
+ }
+ */
+ return 0;
+}