about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/3/C++/cow-test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT2.2/labwork/3/C++/cow-test.cc')
-rw-r--r--usth/ICT2.2/labwork/3/C++/cow-test.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/usth/ICT2.2/labwork/3/C++/cow-test.cc b/usth/ICT2.2/labwork/3/C++/cow-test.cc
new file mode 100644
index 0000000..ea7b86d
--- /dev/null
+++ b/usth/ICT2.2/labwork/3/C++/cow-test.cc
@@ -0,0 +1,9 @@
+#include "cow.h"
+
+int
+main ()
+{
+  Cow cow ("foo", "bar", 7);
+  cow.age = -4;   // some casting happens here
+  cow.moo ();
+}