void StarWay(const std::string & inFile, const std::string & outFile) { std::vector<Planet> planets; if (ReadFile(planets, inFile)) { MarksPlanets(planets); FindWay(planets); OutputResult(planets, outFile); } }
void FindWay( BiTree *root, int Level, char *temp ) { int i; if (root) { temp[Level] = root->data; if ( (root->Lchild == NULL) && (root->Rchild == NULL) ) { for (i = 0; i < Level; i ++) printf("%c ", temp[i]); printf("\n"); } FindWay( root->Lchild, Level + 1, temp ); FindWay( root->Rchild, Level + 1, temp ); } }