Richard Robertson Posted November 4, 2010 Posted November 4, 2010 What is "Node<T> * const NewNode = new Node<T> ( Data );" even supposed to mean? Why do you have a const in there?
jaberwacky Posted November 4, 2010 Author Posted November 4, 2010 What is "Node<T> * const NewNode = new Node<T> ( Data );" even supposed to mean? Why do you have a const in there?Well, that's a good question. Without it, my code doesn't compile. I can do without the const though. Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | Baroque AU3 Code Formatter | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Richard Robertson Posted November 5, 2010 Posted November 5, 2010 Remove the const. The const in particular is what I was questioning anyway.
jaberwacky Posted November 5, 2010 Author Posted November 5, 2010 OK, removed that constant. Fabric of the universe still intact. Well, this concludes yet another highly productive coding session. If only I could make millions of dollars this productively. Node.h contains my first successful attempt at operator overloading. That doesn't mean that it does anything useful, yet! I'm so excited! I bid you peace. Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | Baroque AU3 Code Formatter | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Richard Robertson Posted November 5, 2010 Posted November 5, 2010 I would have used += to be the "push" operation on the node. You don't know for sure that your data type supports the addition operator.
canny Posted December 18, 2010 Posted December 18, 2010 I had to create a linked list class for integers. ... I converted my two classes. One was a Node class
jaberwacky Posted December 19, 2010 Author Posted December 19, 2010 I had to create a linked list class for integers. ... I converted my two classes. One was a Node classI bet your mom is so proud of you. Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | Baroque AU3 Code Formatter | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now