aboutsummaryrefslogtreecommitdiff
path: root/Inclass 10/PointerExamples.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-08 15:55:18 -0800
committerConnor McDowell <[email protected]>2024-02-08 15:55:18 -0800
commit2049a2c87f64bc3c4f9db66ceac0bac44ccb8b99 (patch)
tree7632866bc847ba8d66d86ce6c21d1e73851fc7e5 /Inclass 10/PointerExamples.cpp
parentfiles and functions set up (diff)
downloadin-class-exercise-10-connormcdowell275-2049a2c87f64bc3c4f9db66ceac0bac44ccb8b99.tar.xz
in-class-exercise-10-connormcdowell275-2049a2c87f64bc3c4f9db66ceac0bac44ccb8b99.zip
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
Diffstat (limited to 'Inclass 10/PointerExamples.cpp')
-rw-r--r--Inclass 10/PointerExamples.cpp17
1 files changed, 11 insertions, 6 deletions
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)
{