aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-17 20:21:55 -0800
committerConnor McDowell <[email protected]>2024-02-17 20:21:55 -0800
commit8804cafc7e1245872d50b6763fef042fa6288e49 (patch)
tree48a77e5d979c9b16cf37696cd68bcfdc8cbb8310
parentthere was an incorrectness, newNode and nextNode's swap did not persist after... (diff)
downloadin-class-exercise-10-connormcdowell275-8804cafc7e1245872d50b6763fef042fa6288e49.tar.xz
in-class-exercise-10-connormcdowell275-8804cafc7e1245872d50b6763fef042fa6288e49.zip
maybe for got to pushHEADmain
-rw-r--r--Inclass 10/program.cpp7
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