919 lines
41 KiB
C++
919 lines
41 KiB
C++
|
|
|
|
#include <iostream>
|
|
#include "ZCppMain/ZtCStringEx.H"
|
|
|
|
|
|
using namespace std ;
|
|
using namespace ZNsMain ;
|
|
|
|
|
|
namespace ZNsMain
|
|
{
|
|
|
|
namespace ZNsExam
|
|
{
|
|
|
|
template<typename TDummy=void*> class ZtCExamCList
|
|
{
|
|
public:
|
|
|
|
class CHelpObj
|
|
{
|
|
public:
|
|
|
|
CHelpObj()
|
|
{
|
|
cout<<"* CHelpObj()"<<endl;
|
|
}
|
|
|
|
CHelpObj(const CHelpObj& rhs)
|
|
{
|
|
cout<<"* CHelpObj(const CHelpObj& rhs)"<<endl;
|
|
}
|
|
|
|
public:
|
|
};/*
|
|
class CHelpObj*/
|
|
|
|
|
|
struct StFunctor
|
|
{
|
|
static void ShowElement(int ArgiValue){cout<<"#1 Value="<<ArgiValue<<endl;}
|
|
};
|
|
struct StFunctor2
|
|
{
|
|
static void ShowElement(int ArgiValue, CHelpObj)
|
|
{cout<<"#2 Value="<<ArgiValue<<", CHelpObj Addr=None"<<" With CHelpObj"<<endl;}
|
|
};
|
|
struct StFunctor3
|
|
{
|
|
static void ShowElement(int ArgiValue, CHelpObj& AR_CHelpObj)
|
|
{cout<<"#3 Value="<<ArgiValue<<", HelpObj Ptr="<<&AR_CHelpObj<<" With CHelpObj Ref"<<endl;}
|
|
};
|
|
struct StFunctor4
|
|
{
|
|
static void ShowElement(int ArgiValue, CHelpObj& AR_CHelpObj)
|
|
{cout<<"#4 Value="<<ArgiValue<<", HelpObj Ptr="<<&AR_CHelpObj<<" With CHelpObj in Ptr"<<endl;}
|
|
};
|
|
struct StFunctor5
|
|
{
|
|
static void ShowElement(int ArgiValue, CHelpObj& AR_CHelpObj, CHelpObj& AR_CHelpObj2)
|
|
{cout<<"#5 Value="<<ArgiValue<<", HelpObj Ptr="<<&AR_CHelpObj<<" With CHelpObj Ref 2"<<endl;}
|
|
};
|
|
struct StFunctor6
|
|
{
|
|
static void ShowElement(int ArgiValue, CHelpObj& AR_CHelpObj, CHelpObj AO_CHelpObj2)
|
|
{cout<<"#6 Value="<<ArgiValue<<", HelpObj Ptr="<<&AR_CHelpObj<<" With CHelpObj Half Ref"<<endl;}
|
|
};
|
|
|
|
public:
|
|
|
|
typedef ZtCStringBase<char> CStringBase ;
|
|
typedef const CStringBase CStringBaseC;
|
|
|
|
/* 아래 자료형에 대해, CStringBase::Fetch() 호출 여부 실험.
|
|
|
|
ZtCBaseList<CStringBase&, CStringBase &>
|
|
ZtCBaseList<CStringBase&, CStringBaseC&>
|
|
|
|
*/
|
|
typedef ZtCBaseList
|
|
<CStringBase, CStringBase &> CStringList1 ;
|
|
typedef ZtCBaseList
|
|
<CStringBase, CStringBaseC&> CStringList2 ;
|
|
|
|
public:
|
|
|
|
|
|
class ZCBaseListEx10 : public ZtCBaseList
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx10, true>
|
|
>
|
|
{
|
|
public :
|
|
|
|
typedef ZtCBaseList ///////////////////////////////////////////////////////
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx10, true>
|
|
>
|
|
ZCBaseList; ///////////////////////////////////////////////////////////////
|
|
|
|
friend class ZtCBaseList //////////////////////////////////////////////////
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx10, true>
|
|
>;
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
/*****************************************************************************/
|
|
typedef typename ZCBaseList::ZCLink ZCLink ;
|
|
/*****************************************************************************/
|
|
typedef typename ZCBaseList::iterator iterator ;
|
|
typedef typename ZCBaseList::const_iterator const_iterator;
|
|
/*****************************************************************************/
|
|
|
|
public :
|
|
|
|
_VT_ ZTypLong capacity() const
|
|
{
|
|
cout<<"[ZCBaseListEx10 : capacity()]"; return 0;
|
|
}/*
|
|
_VT_ ZTypLong capacity() const*/
|
|
|
|
_VT_ ZTypLong size_free() const
|
|
{
|
|
cout<<"[ZCBaseListEx10 : size_free()]"; return 0;
|
|
}/*
|
|
_VT_ ZTypLong size_free() const*/
|
|
|
|
private:
|
|
|
|
_VT_ ZCLink* SendFreeOut() const
|
|
{
|
|
cout<<"** ZCBaseListEx10 : SendFreeOut()"<<endl;
|
|
|
|
return this->ZCBaseList::NewLink();
|
|
}/*
|
|
_VT_ ZCLink* SendFreeOut() const*/
|
|
|
|
_VT_ ZCLink* SendFreeOut(CStringBase& AO_ArgData) const
|
|
{
|
|
cout<<"** ZCBaseListEx10 : SendFreeOut(TypeArg)"<<endl;
|
|
|
|
return this->ZCBaseList::NewLink(AO_ArgData);
|
|
}/*
|
|
_VT_ ZCLink* SendFreeOut(CStringBase& AO_ArgData) const*/
|
|
|
|
_VT_ void SendFreeOut
|
|
(ZTypLong AL_NeedCnt, ZCLink*& APR_HeadLink, ZCLink*& APR_TailLink) const
|
|
{
|
|
cout<<"** ZCBaseListEx10 : SendFreeOut("<<AL_NeedCnt<<", ZCLink*&, ZCLink*&)"<<endl;
|
|
|
|
this->ZCBaseList::NewLink(AL_NeedCnt, APR_HeadLink, APR_TailLink);
|
|
}
|
|
|
|
_VT_ void SendFreeOutCopy /*///////////////////////*/
|
|
(
|
|
ZCLink* AP_LinkOrgin, ZTypLong AL_FarNum ,
|
|
ZCLink*& APR_HeadCopy, ZCLink*& APR_TailCopy
|
|
) const
|
|
/////////////////////////////////////////////////////
|
|
{
|
|
cout<<"** ZCBaseListEx10 : SendFreeOut(ZCLink*, "<<AL_FarNum<<", ZCLink*&, ZCLink*&)"<<endl;
|
|
|
|
this->ZCBaseList::NewLinkCopy(AP_LinkOrgin, AL_FarNum, APR_HeadCopy, APR_TailCopy);
|
|
}
|
|
|
|
_VT_ void RecvFreeIn(ZCLink* AP_DelLink)
|
|
{
|
|
cout<<"** ZCBaseListEx10 : RecvFreeIn(AP_DelLink)"<<endl;
|
|
|
|
this->ZCBaseList::DelLink(AP_DelLink);
|
|
}/*
|
|
_VT_ void RecvFreeIn(ZCLink* AP_DelLink)*/
|
|
|
|
_VT_ void RecvFreeIn //////////////////////////////////
|
|
(
|
|
ZTypLong AL_CutCnt ,
|
|
ZCLink* AP_CutHead,
|
|
ZCLink* AP_CutTail
|
|
)
|
|
///////////////////////////////////////////////////////
|
|
{
|
|
cout<<"** ZCBaseListEx10 : RecvFreeIn("<<AL_CutCnt<<", AP_CutHead, AP_CutTail)"<<endl;
|
|
|
|
this->ZCBaseList::DelLink(AL_CutCnt, AP_CutHead, AP_CutTail);
|
|
}
|
|
|
|
private:
|
|
};/*
|
|
class ZCBaseListEx10 : public ZtCBaseList*/
|
|
|
|
|
|
class ZCBaseListEx11 : public ZtCBaseList
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx11, false>
|
|
>
|
|
{
|
|
public :
|
|
|
|
typedef ZtCBaseList ///////////////////////////////////////////////////////
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx11, false>
|
|
>
|
|
ZCBaseList; ///////////////////////////////////////////////////////////////
|
|
|
|
friend class ZtCBaseList //////////////////////////////////////////////////
|
|
<
|
|
CStringBase, CStringBase&, ZCAllocator, ZTypLong
|
|
, ZNsMain::ZtCMoveObj <CStringBase, CStringBase&, true>
|
|
, ZNsType::ZtCTypeCRTP<ZCBaseListEx11, false>
|
|
>;
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
/*****************************************************************************/
|
|
typedef typename ZCBaseList::ZCLink ZCLink ;
|
|
/*****************************************************************************/
|
|
typedef typename ZCBaseList::iterator iterator ;
|
|
typedef typename ZCBaseList::const_iterator const_iterator;
|
|
/*****************************************************************************/
|
|
public :
|
|
|
|
_VT_ ZTypLong capacity() const
|
|
{
|
|
cout<<"[ZCBaseListEx11 : capacity()]"; return 0;
|
|
}/*
|
|
_VT_ ZTypLong capacity() const*/
|
|
|
|
_VT_ ZTypLong size_free() const
|
|
{
|
|
cout<<"[ZCBaseListEx11 : size_free()]"; return 0;
|
|
}/*
|
|
_VT_ ZTypLong size_free() const*/
|
|
|
|
private:
|
|
|
|
_VT_ ZCLink* SendFreeOut()
|
|
{
|
|
cout<<"** ZCBaseListEx11 : SendFreeOut()"<<endl;
|
|
|
|
return this->ZCBaseList::NewLink();
|
|
}/*
|
|
_VT_ ZCLink* SendFreeOut()*/
|
|
|
|
_VT_ ZCLink* SendFreeOut(CStringBase& AO_ArgData)
|
|
{
|
|
cout<<"** ZCBaseListEx11 : SendFreeOut(CStringBase&)"<<endl;
|
|
|
|
return this->ZCBaseList::NewLink(AO_ArgData);
|
|
}/*
|
|
_VT_ ZCLink* SendFreeOut(CStringBase& AO_ArgData)*/
|
|
|
|
_VT_ void SendFreeOut
|
|
(ZTypLong AL_NeedCnt, ZCLink*& APR_HeadLink, ZCLink*& APR_TailLink)
|
|
{
|
|
cout<<"** ZCBaseListEx11 : SendFreeOut("<<AL_NeedCnt<<", ZCLink*&, ZCLink*&)"<<endl;
|
|
|
|
this->ZCBaseList::NewLink(AL_NeedCnt, APR_HeadLink, APR_TailLink);
|
|
}
|
|
|
|
_VT_ void SendFreeOutCopy /*///////////////////////*/
|
|
(
|
|
ZCLink* AP_LinkOrgin, ZTypLong AL_FarNum ,
|
|
ZCLink*& APR_HeadCopy, ZCLink*& APR_TailCopy
|
|
)
|
|
/////////////////////////////////////////////////////
|
|
{
|
|
cout<<"** ZCBaseListEx11 : SendFreeOut(ZCLink*, "<<AL_FarNum<<", ZCLink*&, ZCLink*&)"<<endl;
|
|
|
|
this->ZCBaseList::NewLinkCopy(AP_LinkOrgin, AL_FarNum, APR_HeadCopy, APR_TailCopy);
|
|
}
|
|
|
|
_VT_ void RecvFreeIn(ZCLink* AP_DelLink)
|
|
{
|
|
cout<<"** ZCBaseListEx11 : RecvFreeIn(AP_DelLink)"<<endl;
|
|
|
|
this->ZCBaseList::DelLink(AP_DelLink);
|
|
}/*
|
|
_VT_ void RecvFreeIn(ZCLink* AP_DelLink)*/
|
|
|
|
_VT_ void RecvFreeIn //////////////////////////////////
|
|
(
|
|
ZTypLong AL_CutCnt ,
|
|
ZCLink* AP_CutHead,
|
|
ZCLink* AP_CutTail
|
|
)
|
|
///////////////////////////////////////////////////////
|
|
{
|
|
cout<<"** ZCBaseListEx11: RecvFreeIn("<<AL_CutCnt<<", AP_CutHead, AP_CutTail)"<<endl;
|
|
|
|
this->ZCBaseList::DelLink(AL_CutCnt, AP_CutHead, AP_CutTail);
|
|
}
|
|
|
|
private:
|
|
};/*
|
|
class ZCBaseListEx11 : public ZtCBaseList*/
|
|
|
|
|
|
typedef typename ZCBaseListEx10::ZCLink ZCLink10;
|
|
typedef typename ZCBaseListEx11::ZCLink ZCLink11;
|
|
|
|
|
|
static void ShowDataInNode(const CStringBase& AR_Data, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
cout<<++ARRI_CallCnt<<"* Data : "<<AR_Data<<endl;
|
|
}/*
|
|
static void ShowDataInNode(const CStringBase& AR_Data, ZTypLong& ARRI_CallCnt)*/
|
|
|
|
|
|
static void Append10(ZCLink10& AR_CLink)
|
|
{
|
|
(*AR_CLink).append("__");
|
|
}/*
|
|
static void Append10(ZCLink10& AR_CLink)*/
|
|
|
|
|
|
static void ShowNode10(ZCLink10& AR_CLink, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
++ARRI_CallCnt;
|
|
|
|
cout<<ARRI_CallCnt<<" * Node10 Prev : "<<*(AR_CLink-1)<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node10 Curr : " <<*(AR_CLink )<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node10 Prev : "<<*(AR_CLink+1)<<endl;
|
|
}/*
|
|
static void ShowNode10(ZCLink10& AR_CLink, ZTypLong& ARRI_CallCnt)*/
|
|
static void ShowNode11(ZCLink11& AR_CLink, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
++ARRI_CallCnt;
|
|
|
|
cout<<ARRI_CallCnt<<" * Node11 Prev : "<<*(AR_CLink-1)<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node11 Curr : " <<*(AR_CLink )<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node11 Prev : "<<*(AR_CLink+1)<<endl;
|
|
}/*
|
|
static void ShowNode11(ZCLink11& AR_CLink, ZTypLong& ARRI_CallCnt)*/
|
|
|
|
|
|
static void ShowNode10_2(ZCLink10& AR_CLink, ostream& AR_OS, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
++ARRI_CallCnt;
|
|
|
|
cout<<ARRI_CallCnt<<" * Node10_2 Prev : "<<*(AR_CLink-1)<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node10_2 Curr : " <<*(AR_CLink )<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node10_2 Prev : "<<*(AR_CLink+1)<<endl;
|
|
}/*
|
|
static void ShowNode10_2(ZCLink10& AR_CLink, ostream& AR_OS, ZTypLong& ARRI_CallCnt)*/
|
|
static void ShowNode11_2(ZCLink11& AR_CLink, ostream& AR_OS, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
++ARRI_CallCnt;
|
|
|
|
cout<<ARRI_CallCnt<<" * Node11_2 Prev : "<<*(AR_CLink-1)<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node11_2 Curr : " <<*(AR_CLink )<<endl;
|
|
cout<<ARRI_CallCnt<<" * Node11_2 Prev : "<<*(AR_CLink+1)<<endl;
|
|
}/*
|
|
static void ShowNode11_2(ZCLink11& AR_CLink, ostream& AR_OS, ZTypLong& ARRI_CallCnt)*/
|
|
|
|
|
|
static void ShowNode10_3(ZCLink10& AR_CLink, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
cout<<++ARRI_CallCnt<<" * Node10 Curr : " <<*(AR_CLink )<<endl;
|
|
}/*
|
|
static void ShowNode10_3(ZCLink10& AR_CLink, ZTypLong& ARRI_CallCnt)*/
|
|
static void ShowNode11_3(ZCLink11& AR_CLink, ZTypLong& ARRI_CallCnt)
|
|
{
|
|
cout<<++ARRI_CallCnt<<" * Node11 Curr : " <<*(AR_CLink )<<endl;
|
|
}/*
|
|
static void ShowNode11_3(ZCLink11& AR_CLink, ZTypLong& ARRI_CallCnt)*/
|
|
|
|
|
|
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)
|
|
{
|
|
ZTypLong VI_CallCnt=0;
|
|
|
|
CStringBase VO_CStringBase;
|
|
CStringList1 VO_ListOfStr1 ;
|
|
CStringList2 VO_ListOfStr2 ;
|
|
|
|
VO_ListOfStr1.AddTail(VO_CStringBase("data 10"));
|
|
VO_ListOfStr1.AddTail(VO_CStringBase("data 40"));
|
|
VO_ListOfStr1.AddTail(VO_CStringBase("data 20"));
|
|
VO_ListOfStr1.AddTail(VO_CStringBase("data 40"));
|
|
VO_ListOfStr1.AddTail(VO_CStringBase("data 04"));
|
|
|
|
cout<<"# VO_CStringBase data : " <<VO_CStringBase<<endl;
|
|
|
|
cout<<"# 1th IterElement ####" <<endl;
|
|
{
|
|
VO_ListOfStr1.IterElement(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
}
|
|
/*///////////////////////////////////*/
|
|
|
|
|
|
cout<<endl;
|
|
|
|
|
|
VO_ListOfStr2.AddTail(VO_CStringBase("data 10"));
|
|
VO_ListOfStr2.AddTail(VO_CStringBase("data 40"));
|
|
VO_ListOfStr2.AddTail(VO_CStringBase("data 20"));
|
|
VO_ListOfStr2.AddTail(VO_CStringBase("data 40"));
|
|
VO_ListOfStr2.AddTail(VO_CStringBase("data 04"));
|
|
|
|
cout<<"# VO_CStringBase data : " <<VO_CStringBase<<endl;
|
|
|
|
cout<<"# 2th IterElement ####" <<endl;
|
|
{
|
|
VO_ListOfStr2.IterElement(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
}
|
|
/*///////////////////////////////////*/
|
|
|
|
|
|
typedef ZtCBaseList<int> CIntList;
|
|
|
|
CHelpObj VO_CHelpObj;
|
|
CIntList VO_CIntList;
|
|
|
|
VO_CIntList.AddTail(10);
|
|
VO_CIntList.AddTail(20);
|
|
VO_CIntList.AddTail(30);
|
|
VO_CIntList.AddTail(40);
|
|
|
|
cout<<endl<<"#### Show CIntList Element ####"<<endl<<endl;
|
|
|
|
VO_CIntList.IterElement(StFunctor ::ShowElement);
|
|
VO_CIntList.IterElement(StFunctor2::ShowElement, VO_CHelpObj );
|
|
VO_CIntList.IterElement(StFunctor3::ShowElement, ZftMCR(VO_CHelpObj) );
|
|
VO_CIntList.IterElement(StFunctor4::ShowElement, ZftMCP(VO_CHelpObj) );
|
|
VO_CIntList.IterElement(StFunctor5::ShowElement, ZftMCP(VO_CHelpObj), ZftMCP(VO_CHelpObj) );
|
|
VO_CIntList.IterElement(StFunctor6::ShowElement, ZftMCP(VO_CHelpObj), VO_CHelpObj );
|
|
|
|
|
|
cout<<endl<<"#### ZCBaseListEx10 and ZCBaseListEx11 ####"<<endl<<endl;
|
|
|
|
ZCBaseListEx10 VO_ZCBaseListEx10 ;
|
|
ZCBaseListEx10 VO_ZCBaseListEx10_2;
|
|
ZCBaseListEx11 VO_ZCBaseListEx11 ;
|
|
|
|
VO_CStringBase="";
|
|
|
|
VO_ZCBaseListEx10.AddTail(VO_CStringBase("data ex 10-1"));
|
|
VO_ZCBaseListEx10.AddTail(VO_CStringBase("data ex 10-2"));
|
|
|
|
VO_ZCBaseListEx11.AddTail(VO_CStringBase("data ex 11-1"));
|
|
VO_ZCBaseListEx11.AddTail(VO_CStringBase("data ex 11-2"));
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10"<<endl<<endl;
|
|
|
|
VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10 ;
|
|
VO_ZCBaseListEx10_2.IterElement(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
|
|
VO_ZCBaseListEx10.AddTail().Fetch(VO_CStringBase("data ex 10-3"));
|
|
VO_ZCBaseListEx10.AddTail().Fetch(VO_CStringBase("data ex 10-4"));
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10 after VO_ZCBaseListEx10.AddTail() 2 times"<<endl<<endl;
|
|
|
|
VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10 ;
|
|
VO_ZCBaseListEx10_2.IterElement(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2.AddHead(VO_ZCBaseListEx10)"<<endl<<endl;
|
|
|
|
VO_ZCBaseListEx10_2.AddHead(VO_ZCBaseListEx10) ;
|
|
VO_ZCBaseListEx10_2.IterElemRev(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 : DeleteTail(2)"<<endl<<endl;
|
|
|
|
VO_ZCBaseListEx10_2.DeleteTail(2);
|
|
VO_ZCBaseListEx10_2.IterElemRev(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 : DeleteHead(1)"<<endl<<endl;
|
|
|
|
VO_ZCBaseListEx10_2.DeleteHead(1);
|
|
VO_ZCBaseListEx10_2.IterElement(&ShowDataInNode, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<"# VO_ZCBaseListEx10 : capacity()="<<VO_ZCBaseListEx10 .capacity()<<endl;
|
|
cout<<"# VO_ZCBaseListEx10_2 : capacity()="<<VO_ZCBaseListEx10_2.capacity()<<endl;
|
|
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10 , ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_2, ZftMCP(cout), ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# show VO_ZCBaseListEx10 element"<<endl;
|
|
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10, ZftMCP(VI_CallCnt=0));
|
|
VO_ZCBaseListEx10_2.SendOutTail
|
|
(*VO_ZCBaseListEx10_2.GetLinkPtr(2), VO_ZCBaseListEx10);
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2's 2th link to VO_ZCBaseListEx10's tail"<<endl;
|
|
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10 , ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_2, ZftMCP(cout), ZftMCP(VI_CallCnt=0));
|
|
|
|
VO_ZCBaseListEx10.IterElemLink(&Append10);
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
VO_ZCBaseListEx10.SendRangeOutAfter
|
|
(
|
|
*VO_ZCBaseListEx10.GetLinkPtr(2)
|
|
, *VO_ZCBaseListEx10.GetLinkPtr(3)
|
|
, 2
|
|
, VO_ZCBaseListEx10_2
|
|
, VO_ZCBaseListEx10_2.GetLinkOpt(2)
|
|
);
|
|
cout<<endl<<"# after VO_ZCBaseListEx10's 2~3th link to VO_ZCBaseListEx10_2's 2th link after"<<endl;
|
|
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10"<<endl;
|
|
|
|
VO_ZCBaseListEx10_2 = VO_ZCBaseListEx10 ;
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10.SendRangeOutBefore(1th, 2th, 2, rhs, 1th)"<<endl;
|
|
|
|
VO_ZCBaseListEx10.SendRangeOutBefore
|
|
(
|
|
*VO_ZCBaseListEx10.GetLinkPtr(1)
|
|
, *VO_ZCBaseListEx10.GetLinkPtr(2)
|
|
, 2
|
|
, VO_ZCBaseListEx10_2
|
|
, VO_ZCBaseListEx10_2.GetLinkOpt(1)
|
|
);
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10.CopyThis(RR(VO_ZCBaseListEx10_2))"<<endl;
|
|
VO_ZCBaseListEx10.CopyThis(RR(VO_ZCBaseListEx10_2));
|
|
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
|
VO_ZCBaseListEx10 .IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLinkNext(1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLinkNext(VO_ZCBaseListEx10_2.HeadRef());
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLinkNext(last)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLinkNext(VO_ZCBaseListEx10_2.TailRef());
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLinkNext(last-1)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLinkNext(VO_ZCBaseListEx10_2.TailRef(1));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2 : Iter Rev"<<endl;
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLinkRev(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLinkPrev(2th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLinkPrev(VO_ZCBaseListEx10_2.HeadRef(1));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLinkPrev(last)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLinkPrev(VO_ZCBaseListEx10_2.TailRef());
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(1th, 4th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(), VO_ZCBaseListEx10_2.HeadRef(3) );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(2th, 1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(1), VO_ZCBaseListEx10_2.HeadRef() );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(2th, 5th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(1), VO_ZCBaseListEx10_2.HeadRef(4) );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(4th, 5th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(3), VO_ZCBaseListEx10_2.HeadRef(4) );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(6th, 2th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(5), VO_ZCBaseListEx10_2.HeadRef(1) );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(6th, 5th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(5), VO_ZCBaseListEx10_2.HeadRef(4) );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.SwapLink(6th, 1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.SwapLink
|
|
( VO_ZCBaseListEx10_2.HeadRef(5), VO_ZCBaseListEx10_2.HeadRef() );
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkHead(2th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkHead( VO_ZCBaseListEx10_2.HeadRef(1));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkTail(1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkTail( VO_ZCBaseListEx10_2.HeadRef());
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkAfter(1th, 6th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkAfter
|
|
( VO_ZCBaseListEx10_2.HeadRef(), VO_ZCBaseListEx10_2.HeadOpt(5));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkBefore(5th, 1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkBefore
|
|
( VO_ZCBaseListEx10_2.HeadRef(4), VO_ZCBaseListEx10_2.HeadOpt());
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkAfter(1th, 2th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkAfter
|
|
( VO_ZCBaseListEx10_2.HeadRef(), VO_ZCBaseListEx10_2.HeadOpt(1));
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveRangeInAfter(1th~3th => 6th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveRangeInAfter
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
VO_ZCBaseListEx10_2.HeadOpt(5)
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveRangeInBefore(4th~6th => 1th)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveRangeInBefore
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(3),
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
VO_ZCBaseListEx10_2.HeadOpt( )
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 for_it() show "<<endl;
|
|
__for_it(ZCBaseListEx10, VO_ZCBaseListEx10_2, VO_Iter)
|
|
{
|
|
cout<<VO_Iter.GetPos()<<" : "<<*VO_Iter<<endl;
|
|
}
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 for_it_r() show "<<endl;
|
|
__for_it_r(ZCBaseListEx10, VO_ZCBaseListEx10_2, VO_Iter)
|
|
{
|
|
cout<<VO_Iter.GetPos()<<" : "<<*VO_Iter<<endl;
|
|
}
|
|
|
|
cout<<endl<<"# VO_ZCBaseListEx10_2 for_itc() show "<<endl;
|
|
__for_itc(ZCBaseListEx10, VO_ZCBaseListEx10_2, VO_Iter)
|
|
{
|
|
cout<<VO_Iter.GetPos()<<" : "<<*VO_Iter<<endl;
|
|
}
|
|
cout<<"*****************************************************"<<endl;
|
|
|
|
_FOR_ITER_EASY_START0_C (VO_ZCBaseListEx10_2, VH_NowIter, i)
|
|
{
|
|
cout<<"# list10_2 const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
|
}
|
|
_FOR_ITER_EASY_CLOSE0_C (VO_ZCBaseListEx10_2, VH_NowIter, i)
|
|
cout<<"*****************************************************"<<endl;
|
|
|
|
_FOR_ITER_EASY_START0_RC(VO_ZCBaseListEx10_2, VH_NowIter, i)
|
|
{
|
|
cout<<"# list10_2 rev const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
|
}
|
|
_FOR_ITER_EASY_CLOSE0_RC(VO_ZCBaseListEx10_2, VH_NowIter, i)
|
|
cout<<"*****************************************************"<<endl;
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(1th, 3th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(3th, 6th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(6th, 1th before)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
false
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(1th, 6th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(2th, 3th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(1),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(2th, 3th before)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(1),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
false
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveLinkIn(2th, 1th before)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveLinkIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(1),
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
false
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveRangeIn(1th, 3th, 6th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveRangeIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveRangeIn(5th, 6th, 1th before)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveRangeIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(4),
|
|
VO_ZCBaseListEx10_2.HeadRef(5),
|
|
VO_ZCBaseListEx10_2.HeadRef( ),
|
|
false
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
|
|
cout<<endl<<"# after VO_ZCBaseListEx10_2.MoveRangeIn(2th, 3th, 4th after)"<<endl;
|
|
VO_ZCBaseListEx10_2.MoveRangeIn
|
|
(
|
|
VO_ZCBaseListEx10_2.HeadRef(1),
|
|
VO_ZCBaseListEx10_2.HeadRef(2),
|
|
VO_ZCBaseListEx10_2.HeadRef(3),
|
|
true
|
|
);
|
|
cout<<"*****************************************************"<<endl;
|
|
VO_ZCBaseListEx10_2.IterElemLink(&ShowNode10_3, ZftMCP(VI_CallCnt=0));
|
|
|
|
|
|
return 0;
|
|
}/*
|
|
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)*/
|
|
|
|
|
|
public:
|
|
};/*
|
|
template<typename TDummy=void*> class ZtCExamCList*/
|
|
|
|
}/*
|
|
namespace ZNsExam*/
|
|
|
|
}/*
|
|
namespace ZNsMain*/
|
|
|
|
|
|
int main(int AI_ArgCnt, char* APP_ArgVal[])
|
|
{
|
|
return ZNsMain::ZNsExam::
|
|
|
|
ZtCExamCList<>::Main(AI_ArgCnt, APP_ArgVal);
|
|
}/*
|
|
int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
|
|
|
|
|
/*////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
■ cygwin 컴파일
|
|
|
|
// g++ -mno-cygwin -o ZtCBaseList_000.exe ZtCBaseList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
|
// g++ -mno-cygwin -o ZtCBaseList_000_D.exe ZtCBaseList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
|
|
|
■ mingw 컴파일
|
|
|
|
g++.exe -o ZtCBaseList_000_mw.exe ZtCBaseList_000.cpp -I../ -lWs2_32 -Wall -Wno-unused-function -Wno-misleading-indentation
|
|
g++.exe -o ZtCBaseList_000_mw_D.exe ZtCBaseList_000.cpp -I../ -lWs2_32 -Wall -Wno-unused-function -Wno-misleading-indentation -D_DEBUG
|
|
|
|
./ZtCBaseList_000_mw.exe
|
|
./ZtCBaseList_000_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 ZtCBaseList_000.exe ZtCBaseList_000.cpp -I../ -Wall -Wno-unused-function -Wno-misleading-indentation
|
|
g++ -std=c++98 -o ZtCBaseList_000_D.exe ZtCBaseList_000.cpp -I../ -Wall -Wno-unused-function -Wno-misleading-indentation -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.
|
|
|
|
■ 실행
|
|
|
|
./ZtCBaseList_000.exe
|
|
./ZtCBaseList_000_D.exe
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////*/
|