commit 2025-08-18 17:26 edit ZCppMain/ZtCObjAVL.H : add ZtCExamAVl
This commit is contained in:
@ -2377,6 +2377,50 @@ namespace ZNsMain
|
|||||||
>
|
>
|
||||||
class ZtCObjAVL /////////////////////////////////////////////////////////////////////*/
|
class ZtCObjAVL /////////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
|
|
||||||
|
namespace ZNsExam
|
||||||
|
{
|
||||||
|
|
||||||
|
template<typename TDummy=void*> class ZtCExamAVL
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static void ShowDataInNode(int AI_Data)
|
||||||
|
{
|
||||||
|
cout<<"* Node Data : "<<AI_Data<<endl;
|
||||||
|
}/*
|
||||||
|
static void ShowDataInNode(int AI_Data)*/
|
||||||
|
|
||||||
|
static int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
|
||||||
|
{
|
||||||
|
using namespace std ;
|
||||||
|
using namespace ZNsMain;
|
||||||
|
|
||||||
|
ZtCObjAVL<int, int> VO_CObjAVL;
|
||||||
|
|
||||||
|
VO_CObjAVL.AddData(10);
|
||||||
|
VO_CObjAVL.AddData(20);
|
||||||
|
VO_CObjAVL.AddData(30);
|
||||||
|
VO_CObjAVL.AddData(40);
|
||||||
|
VO_CObjAVL.AddData(9 );
|
||||||
|
|
||||||
|
cout<<"# In Order" <<endl; VO_CObjAVL.IterInOrder (&ShowDataInNode);
|
||||||
|
cout<<"# Post Order"<<endl; VO_CObjAVL.IterPostOrder(&ShowDataInNode);
|
||||||
|
cout<<"# Pre Order" <<endl; VO_CObjAVL.IterPreOrder (&ShowDataInNode);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}/*
|
||||||
|
static int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)*/
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
};/*
|
||||||
|
template<typename TDummy=void*> class ZtCExamAVL*/
|
||||||
|
|
||||||
|
}/*
|
||||||
|
namespace ZNsExam*/
|
||||||
|
|
||||||
|
|
||||||
}/*
|
}/*
|
||||||
namespace ZNsMain */
|
namespace ZNsMain */
|
||||||
|
|
||||||
@ -2417,7 +2461,6 @@ namespace ZNsMain */
|
|||||||
#########################################################################################*/
|
#########################################################################################*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZNsMain
|
namespace ZNsMain
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user