예제 #1
0
파일: amoebas.cpp 프로젝트: justinsuen/CS9F
void Amoeba::IndentHelp (string ind) {
  cout << ind << Name() << endl;
  Amoeba* child = myYoungestChild;
  while (child != 0) {
    child->IndentHelp(ind + "   ");
    child = child->myOlderSibling;
  }
}
예제 #2
0
파일: amoebas.cpp 프로젝트: justinsuen/CS9F
void Amoeba::PrintDescendants () {
  string ind = "";
  if (myYoungestChild == 0) {
    return;
  }
  else {
    Amoeba* child = myYoungestChild;
    while (child != 0) {
      child->IndentHelp(ind);
      child = child->myOlderSibling;
    }
  }
}