commit 2025-08-24 09:27 edit a bit ZCppMainTest/ZtCObjAVL_000.cpp
This commit is contained in:
@ -2367,50 +2367,6 @@ namespace ZNsMain
|
||||
>
|
||||
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 */
|
||||
|
||||
|
@ -184,20 +184,15 @@ int main(int AR_ArgCnt, char* APP_ArgVal[])*/
|
||||
■ cigwin 컴파일
|
||||
|
||||
// g++ -mno-cygwin -o ZtCArray_000.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
||||
// g++ -mno-cygwin -o ZtCLoadXml_000_D.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
// g++ -mno-cygwin -o ZtCArray_000_D.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
|
||||
■ mingw 컴파일
|
||||
|
||||
// /usr/local/mingw/bin/g++.exe -o ZtCArray_000.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
||||
// /usr/local/mingw/bin/g++.exe -o ZtCLoadXml_000_D.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
// /usr/local/mingw/bin/g++.exe -o ZtCArray_000_D.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
|
||||
■ Linux 컴파일
|
||||
|
||||
// g++ -o ZtCArray_000.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/
|
||||
// g++ -o ZtCLoadXml_000_D.exe ZtCArray_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D_DEBUG
|
||||
|
||||
■ Ubuntu 컴파일
|
||||
|
||||
g++ -std=c++98 -o ZtCArray_000.exe ZtCArray_000.cpp -I../
|
||||
g++ -std=c++98 -o ZtCArray_000_D.exe ZtCArray_000.cpp -I../ -D_DEBUG
|
||||
|
||||
|
@ -171,11 +171,6 @@ int main(int AR_ArgCnt, char* APP_ArgVal[])*/
|
||||
|
||||
■ Linux 컴파일
|
||||
|
||||
// g++ -o ZtCLoadXml_000.exe ZtCLoadXml_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/
|
||||
// g++ -o ZtCLoadXml_000_D.exe ZtCLoadXml_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D_DEBUG
|
||||
|
||||
■ Ubuntu 컴파일
|
||||
|
||||
g++ -std=c++98 -o ZtCLoadXml_000.exe ZtCLoadXml_000.cpp -I../
|
||||
g++ -std=c++98 -o ZtCLoadXml_000_D.exe ZtCLoadXml_000.cpp -I../ -D_DEBUG
|
||||
|
||||
|
121
ZCppMainTest/ZtCObjAVL_000.cpp
Normal file
121
ZCppMainTest/ZtCObjAVL_000.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include "ZCppMain/ZtCObjAVL.H"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
namespace ZNsMain
|
||||
{
|
||||
|
||||
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*/
|
||||
|
||||
|
||||
int main(int AR_ArgCnt, char* APP_ArgVal[])
|
||||
{
|
||||
return ZNsMain::ZNsExam::ZtCExamAVL<>::Main();
|
||||
}/*
|
||||
int main(int AR_ArgCnt, char* APP_ArgVal[])*/
|
||||
|
||||
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
■ cigwin 컴파일
|
||||
|
||||
// g++ -mno-cygwin -o ZtCObjAVL_000.exe ZtCObjAVL_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
||||
// g++ -mno-cygwin -o ZtCObjAVL_000_D.exe ZtCObjAVL_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
|
||||
■ mingw 컴파일
|
||||
|
||||
// /usr/local/mingw/bin/g++.exe -o ZtCObjAVL_000.exe ZtCObjAVL_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
||||
// /usr/local/mingw/bin/g++.exe -o ZtCObjAVL_000_D.exe ZtCObjAVL_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||
|
||||
■ Linux 컴파일
|
||||
|
||||
g++ -std=c++98 -o ZtCObjAVL_000.exe ZtCObjAVL_000.cpp -I../
|
||||
g++ -std=c++98 -o ZtCObjAVL_000_D.exe ZtCObjAVL_000.cpp -I../ -D_DEBUG
|
||||
|
||||
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ gcc --version
|
||||
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ date
|
||||
Sun Aug 24 00:05:51 DST 2025
|
||||
|
||||
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ cat /etc/os-release
|
||||
NAME="Ubuntu"
|
||||
VERSION="20.04.6 LTS (Focal Fossa)"
|
||||
ID=ubuntu
|
||||
ID_LIKE=debian
|
||||
PRETTY_NAME="Ubuntu 20.04.6 LTS"
|
||||
VERSION_ID="20.04"
|
||||
HOME_URL="https://www.ubuntu.com/"
|
||||
SUPPORT_URL="https://help.ubuntu.com/"
|
||||
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
|
||||
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
|
||||
VERSION_CODENAME=focal
|
||||
UBUNTU_CODENAME=focal
|
||||
|
||||
|
||||
[sauron@q381-2657 ZCppMainTest]$ cat /etc/centos-release
|
||||
CentOS Linux release 7.9.2009 (Core)
|
||||
|
||||
[sauron@q381-2657 ZCppMainTest]$ g++ --version
|
||||
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
|
||||
Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
■ 실행
|
||||
|
||||
./ZtCObjAVL_000.exe
|
||||
./ZtCObjAVL_000_D.exe
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////*/
|
Reference in New Issue
Block a user