![]() |
|
That recursion - Printable Version +- Southperry.net (https://www.southperry.net) +-- Forum: Social (https://www.southperry.net/forumdisplay.php?fid=14) +--- Forum: Rubik's Cube (https://www.southperry.net/forumdisplay.php?fid=58) +--- Thread: That recursion (/showthread.php?tid=64251) |
That recursion - Imagine - 2013-05-08 So I have this: Code: template <typename K, typename V>What's wrong with my recursion? EDIT: Owait, I'm stupid. I forgot 1 return statement, which allowed 2 cases to happen at once, creating a node, and then creating an identical node to the right. That recursion - Locked - 2013-05-08 What is "!this" supposed to do? this is a pointer, not a boolean expression. Also consider making a short, self-contained, compilable example. Also another note, this will almost never be null. Checking for it is a bit weird. this will always point to the underlying object. That recursion - Imagine - 2013-05-08 !this refers to the current map pointer I'm on. !this = if something's not there |