¡@

Home 

c++ Programming Glossary: parent.depth

Create std::list of value instead of std::list of pointers in recursive function

http://stackoverflow.com/questions/11335738/create-stdlist-of-value-instead-of-stdlist-of-pointers-in-recursive-function

function like the following void recursive obj parent if parent.depth 1 return obj son son.parent parent son.depth parent.depth 1.. parent.depth 1 return obj son son.parent parent son.depth parent.depth 1 recursive son parent.children.push_back son In this way for.. see that if the test in the recursive funcion had been if parent.depth n return with n 2 this code will not work the stored address..