For a project due tonight ;-p. The project is done, everything works, but I was going back through the code and saw a few of my node class functions don't accept const input when they should be (for good programming, right?). So I added a few consts in, and I'm getting an error that confuzes me (dealing with converting a const to a non-const). I can't see what needs changed for it to work.
Relevant code:
Error:Code:void setLR(const Node<T> *l, const Node<T> *r) { setLeft(l); setRight(r); } void setLeft(const Node<T> *l) { left = l; } //the error is on this line void setRight(const Node<T> *r) { right = r; }
The node class is templated and for the project I'm using, I have a small tool class I use it with. Any ideas what the problem is?Code:error C2440: '=' : cannot convert from 'const Node<T> *' to 'Node<T> *' with [ T=tool ] and [ T=tool ] Conversion loses qualifiers