Website Summary Files Commits Branches @commit @diff @stats
path: root / Week02 / Exercise03 / intarray.h
diff options
context:
space:
mode:
1 files changed, 15 insertions, 0 deletions
-rw-r--r--Week02/Exercise03/intarray.h15
diff --git a/Week02/Exercise03/intarray.h b/Week02/Exercise03/intarray.h
new file mode 100644
index 0000000..9f1c0b0
--- /dev/null
+++ b/Week02/Exercise03/intarray.h
@@ -0,0 +1,15 @@
+#ifndef _INTARRAY
+#define _INTARRAY
+
+struct IntArray {
+ unsigned size;
+ int* elems;
+
+ void deleteSelf();
+ int sum();
+};
+
+IntArray newIntArray(unsigned size);
+void deleteIntArray(IntArray& arr);
+
+#endif