diff options
| author | Connor McDowell <[email protected]> | 2024-02-17 20:21:55 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-17 20:21:55 -0800 |
| commit | 8804cafc7e1245872d50b6763fef042fa6288e49 (patch) | |
| tree | 48a77e5d979c9b16cf37696cd68bcfdc8cbb8310 | |
| parent | there was an incorrectness, newNode and nextNode's swap did not persist after... (diff) | |
| download | in-class-exercise-10-connormcdowell275-main.tar.xz in-class-exercise-10-connormcdowell275-main.zip | |
| -rw-r--r-- | Inclass 10/program.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Inclass 10/program.cpp b/Inclass 10/program.cpp index e591996..c1191ec 100644 --- a/Inclass 10/program.cpp +++ b/Inclass 10/program.cpp @@ -15,7 +15,10 @@ int main() { Node newNode{}; - newNode.data = 32; + int i; + cin >> i; + + newNode.data = i; cout << newNode.data << endl; @@ -38,6 +41,6 @@ int main() Square(&nextNode); cout << nextNode.data << endl; - + return 0; }
\ No newline at end of file |