aboutsummaryrefslogtreecommitdiff
path: root/InClassExercise 9/PointerExercises.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'InClassExercise 9/PointerExercises.cpp')
-rw-r--r--InClassExercise 9/PointerExercises.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/InClassExercise 9/PointerExercises.cpp b/InClassExercise 9/PointerExercises.cpp
new file mode 100644
index 0000000..003734d
--- /dev/null
+++ b/InClassExercise 9/PointerExercises.cpp
@@ -0,0 +1,21 @@
+#include "PointerExercises.h"
+#include <iostream>
+using std::cout;
+using std::endl;
+
+void Swap(Node* first, Node* second)
+{
+ int temp = first->_num;
+ first->_num = second->_num;
+ second->_num = temp;
+}
+
+void Standardize_101(Node* node)
+{
+ node->_num %= 101;
+}
+
+void Square(Node* node)
+{
+ node->_num *= node->_num;
+} \ No newline at end of file