Changes

Jump to: navigation, search

Assignment 2 (Release 0.1): Q & A

526 bytes added, 14:16, 6 October 2012
no edit summary
'''Q:''' Since we can have a potential of unlimited frames within frames, how can we tell how many frames are in the console? (how far down in the frames within frames) <br>
'''Question Submitted by:''' Wesley Hamilton and Joe Higginson<br>'''A:''' You can use this simple function to calculate the number of parents within parents of the current frame: <source lang="cpp"> int SomeClass::number_of_parents(){  return (parent ? 1+parent->number_of_parents() : 0);  //"parent" is a reference to the parent of the current frame }  </source> But you can't know how many children the current frame has, unless you create special class members to keep/calculate that number.<br>'''Answer Submitted by:''' [[Team 42 Contributions | Team0x2Au]] <br><br>
== Bug Reports ==

Navigation menu