From 2049a2c87f64bc3c4f9db66ceac0bac44ccb8b99 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Thu, 8 Feb 2024 15:55:18 -0800 Subject: i literally have NO idea what to do. all i get is the addresses when the assignment is asking for the _num values to be swapped BUT NUM ISNT EVEN PART OF THE FUCKING STRUCTS --- Inclass 10/PointerExamples.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Inclass 10/PointerExamples.cpp') diff --git a/Inclass 10/PointerExamples.cpp b/Inclass 10/PointerExamples.cpp index 4889659..16de9c3 100644 --- a/Inclass 10/PointerExamples.cpp +++ b/Inclass 10/PointerExamples.cpp @@ -8,19 +8,24 @@ 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; +} -} - -void Standardize_101(Node* node) +void Standardize_101(Node* thirdNode) { - - + /*int stan = 0; + Node* thirdNode = stan; + thirdNode->_data = stan;*/ } -void Square(Node* node) +void Square(Node* thirdNode) { -- cgit v1.2.3