Files
RepoMain/ZCppMainTest/ZtCLink_001.cpp

141 lines
5.3 KiB
C++

#include <string>
#include <iostream>
#include "ZCppMain/ZtCLinkList.H"
using namespace std;
namespace ZNsMain
{
namespace ZNsExam
{
class ZCLinkEx :
public ZtCLink<ZCEmpty, ZCLinkEx>
{
};
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)
{
typedef ZtCLink<ZCEmpty, ZCEmpty> ZCLink1;
typedef ZtCLink<string , ZCEmpty> ZCLink2;
typedef ZtCLink<ZCEmpty, string > ZCLink3;
typedef ZtCLink<string , string > ZCLink4;
typedef ZCLinkEx ZCLink5;
cout<<"# ZCLink1::TypeThis -> "<<typeid(ZCLink1::TypeThis ).name()<<endl;
cout<<"# ZCLink1::TypeBase -> "<<typeid(ZCLink1::TypeBase ).name()<<endl;
cout<<"# ZCLink1::TypeChild-> "<<typeid(ZCLink1::TypeChild).name()<<endl;
cout<<"**********************************************************"<<endl;
cout<<"# ZCLink2::TypeThis -> "<<typeid(ZCLink2::TypeThis ).name()<<endl;
cout<<"# ZCLink2::TypeBase -> "<<typeid(ZCLink2::TypeBase ).name()<<endl;
cout<<"# ZCLink2::TypeChild-> "<<typeid(ZCLink2::TypeChild).name()<<endl;
cout<<"**********************************************************"<<endl;
cout<<"# ZCLink3::TypeThis -> "<<typeid(ZCLink3::TypeThis ).name()<<endl;
cout<<"# ZCLink3::TypeBase -> "<<typeid(ZCLink3::TypeBase ).name()<<endl;
cout<<"# ZCLink3::TypeChild-> "<<typeid(ZCLink3::TypeChild).name()<<endl;
cout<<"**********************************************************"<<endl;
cout<<"# ZCLink4::TypeThis -> "<<typeid(ZCLink4::TypeThis ).name()<<endl;
cout<<"# ZCLink4::TypeBase -> "<<typeid(ZCLink4::TypeBase ).name()<<endl;
cout<<"# ZCLink4::TypeChild-> "<<typeid(ZCLink4::TypeChild).name()<<endl;
cout<<"**********************************************************"<<endl;
cout<<"# ZCLink5::TypeThis -> "<<typeid(ZCLink5::TypeThis ).name()<<endl;
cout<<"# ZCLink5::TypeBase -> "<<typeid(ZCLink5::TypeBase ).name()<<endl;
cout<<"# ZCLink5::TypeChild-> "<<typeid(ZCLink5::TypeChild).name()<<endl;
return 0;
}/*
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)*/
}/*
namespace ZNsExam*/
}/*
namespace ZNsMain*/
int main(int AI_ArgCnt, char* APP_ArgVal[])
{
return ZNsMain::ZNsExam::Main(AI_ArgCnt, APP_ArgVal);
}/*
int main(int AI_ArgCnt, char* APP_ArgVal[])*/
/*////////////////////////////////////////////////////////////////////////////////////////
■ cygwin 컴파일
// g++ -mno-cygwin -o ZtCLink_001.exe ZtCLink_001.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
// g++ -mno-cygwin -o ZtCLink_001_D.exe ZtCLink_001.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
■ mingw 컴파일
g++.exe -o ZtCLink_001_mw.exe ZtCLink_001.cpp -I../
g++.exe -o ZtCLink_001_mw_D.exe ZtCLink_001.cpp -I../ -D_DEBUG
./ZtCLink_001_mw.exe
./ZtCLink_001_mw_D.exe
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# date
Sun Aug 24 10:47:09 KST 2025
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# g++ --version
g++.exe (Rev2, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 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.
■ Linux 컴파일
g++ -std=c++98 -o ZtCLink_001.exe ZtCLink_001.cpp -I../
g++ -std=c++98 -o ZtCLink_001_D.exe ZtCLink_001.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.
■ 실행
./ZtCLink_001.exe
./ZtCLink_001_D.exe
////////////////////////////////////////////////////////////////////////////////////////*/