コード例 #1
0
ファイル: mlita2.4.cpp プロジェクト: ASmMegane/MLiTA
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);
	}
}
コード例 #2
0
ファイル: BiTree4.c プロジェクト: Gaoyuan0710/Datatructures
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 );

	}
}