diff options
| author | Connor McDowell <[email protected]> | 2024-02-08 15:55:18 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-08 15:55:18 -0800 |
| commit | 2049a2c87f64bc3c4f9db66ceac0bac44ccb8b99 (patch) | |
| tree | 7632866bc847ba8d66d86ce6c21d1e73851fc7e5 /Inclass 10/program.cpp | |
| parent | files and functions set up (diff) | |
| download | in-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/program.cpp')
| -rw-r--r-- | Inclass 10/program.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Inclass 10/program.cpp b/Inclass 10/program.cpp index d3f8005..59231d5 100644 --- a/Inclass 10/program.cpp +++ b/Inclass 10/program.cpp @@ -13,20 +13,23 @@ using std::endl; int main() { - Node firstNode{}; - Node secondNode{}; - Node thirdNode{}; + Node newNode{}; - firstNode._data = 24; - secondNode._data = 16; - thirdNode._data = 4; + newNode.data = 32; + cout << newNode.data << endl; - Swap(&firstNode, &secondNode); + Node nextNode{}; - Standardize_101(&thirdNode); + nextNode.data = 438; - Square(&thirdNode); + newNode.next = &nextNode; + + Swap(&newNode, &nextNode); + + Standardize_101(&newNode); + + Square(&nextNode); return 0; }
\ No newline at end of file |