diff options
| author | Connor McDowell <[email protected]> | 2024-02-08 16:16:57 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-08 16:16:57 -0800 |
| commit | d6a5d5c6287974e0de3acc03fde384efa7c30c3d (patch) | |
| tree | a2d109a99cd7dd3e2e5e66d5a0e307691eb65028 | |
| parent | OHMYGOD I FIGURED IT OUT (diff) | |
| download | in-class-exercise-10-connormcdowell275-d6a5d5c6287974e0de3acc03fde384efa7c30c3d.tar.xz in-class-exercise-10-connormcdowell275-d6a5d5c6287974e0de3acc03fde384efa7c30c3d.zip | |
ohmygoditallworks
| -rw-r--r-- | Inclass 10/PointerExamples.cpp | 6 | ||||
| -rw-r--r-- | Inclass 10/program.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Inclass 10/PointerExamples.cpp b/Inclass 10/PointerExamples.cpp index 0511482..3a652e0 100644 --- a/Inclass 10/PointerExamples.cpp +++ b/Inclass 10/PointerExamples.cpp @@ -19,14 +19,14 @@ void Swap(Node* first, Node* second) void Standardize_101(Node* newNode) { - newNode->data % 101; + newNode->data = newNode->data % 101; } -void Square(Node* thirdNode) +void Square(Node* nextNode) { - + nextNode->data = nextNode->data * nextNode->data; }
\ No newline at end of file diff --git a/Inclass 10/program.cpp b/Inclass 10/program.cpp index ce6fc87..fb9b9c6 100644 --- a/Inclass 10/program.cpp +++ b/Inclass 10/program.cpp @@ -35,5 +35,7 @@ int main() Square(&nextNode); + cout << nextNode.data << endl; + return 0; }
\ No newline at end of file |