fixing the comments

This commit is contained in:
Jidong Xiao
2024-02-13 13:06:08 -05:00
parent 1d19cc5021
commit 9cea2712bb

View File

@@ -3,8 +3,7 @@
// Note: It's ok that all the member variables are public for this // Note: It's ok that all the member variables are public for this
// tiny class. We'll build up to a more robust and complete linked // tiny class.
// list implementation in lecture 11.
template <class T> template <class T>
class Node { class Node {
public: public:
@@ -39,7 +38,7 @@ void reverse(Node<T>* &input) {
int main() { int main() {
// manually create a linked list of notes with 4 elements // manually create a linked list of nodes with 4 elements
Node<int>* my_list = new Node<int>; Node<int>* my_list = new Node<int>;
my_list->value = 1; my_list->value = 1;
my_list->ptr = new Node<int>; my_list->ptr = new Node<int>;
@@ -57,7 +56,7 @@ int main() {
// Note: We are not deleting any of the Nodes we created... so this // Note: We are not deleting any of the Nodes we created... so this
// program has memory leaks! More on this in lecture 11. // program has memory leaks!
} }