Пример #1
0
void Amoeba::IndentHelp (string ind) {
  cout << ind << Name() << endl;
  Amoeba* child = myYoungestChild;
  while (child != 0) {
    child->IndentHelp(ind + "   ");
    child = child->myOlderSibling;
  }
}
Пример #2
0
void Amoeba::PrintDescendants () {
  string ind = "";
  if (myYoungestChild == 0) {
    return;
  }
  else {
    Amoeba* child = myYoungestChild;
    while (child != 0) {
      child->IndentHelp(ind);
      child = child->myOlderSibling;
    }
  }
}