In a recent posting, my notation was corrected:
[color=blue]
> tree* prootNode = new tree;
> tree* psubNode = new tree;
>
> prootNode->child = psubNode;
> psubNode->parent = prootNode;[/color]
struct tree rootNode;
struct tree subNode;
rootNode.child = &subNode;
subNode.parent = &rootNode;
Is this due to some general C++ convension/practice or because its
compiler specific to use indirection? I've seen many compilers
understanding -> however.
Thanks,
Casper
[color=blue]
> tree* prootNode = new tree;
> tree* psubNode = new tree;
>
> prootNode->child = psubNode;
> psubNode->parent = prootNode;[/color]
struct tree rootNode;
struct tree subNode;
rootNode.child = &subNode;
subNode.parent = &rootNode;
Is this due to some general C++ convension/practice or because its
compiler specific to use indirection? I've seen many compilers
understanding -> however.
Thanks,
Casper
Comment