aboutsummaryrefslogtreecommitdiff
path: root/Inclass 10/PointerExamples.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Inclass 10/PointerExamples.cpp')
-rw-r--r--Inclass 10/PointerExamples.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/Inclass 10/PointerExamples.cpp b/Inclass 10/PointerExamples.cpp
index 16de9c3..0511482 100644
--- a/Inclass 10/PointerExamples.cpp
+++ b/Inclass 10/PointerExamples.cpp
@@ -8,20 +8,19 @@ using std::endl;
void Swap(Node* first, Node* second)
{
- int test = 0;
- int test2 = 0;
- first->data = test;
- second->data = test2;
-
-
- cout << "first node swapped is (correct 16): " << second << " the second node swapped is (correct 24): " << first << endl;
+ int test;
+ test = first->data;
+ first->data = second->data;
+ second->data = test;
+
+ cout << test << endl;
+
}
-void Standardize_101(Node* thirdNode)
+void Standardize_101(Node* newNode)
{
- /*int stan = 0;
- Node* thirdNode = stan;
- thirdNode->_data = stan;*/
+ newNode->data % 101;
+
}