- May 8, 2005
- 415
- 0
- 76
In c++, I'm have a node class which can make other nodes and when it does, it sets up that node's parent field (which is of type Node *) to the node that is making it. Now, I'm not sure how to pass the address of the object I'm currently working in. I figured, it'd be &this but that gives me an error. Just 'this' works but when i check it, the value is null (0).
The error I get with &this is error: lvalue required as unary ‘&’ operand
Any suggestions.
The error I get with &this is error: lvalue required as unary ‘&’ operand
Any suggestions.