edit test.cpp
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
#define __ZTCARRAY_H__
|
||||
|
||||
|
||||
#include "ZMainHead.H"
|
||||
#include "ZCppMain/ZMainHead.H"
|
||||
|
||||
|
||||
namespace ZNsMain
|
||||
|
@ -566,7 +566,7 @@ namespace ZNsMain
|
||||
/*///////////*/ ) const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj;
|
||||
ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj;
|
||||
#endif //_DEBUG
|
||||
|
||||
APR_HeadLink=new ZCLink; ZCLink* VP_TempLink=APR_HeadLink;
|
||||
@ -596,8 +596,8 @@ namespace ZNsMain
|
||||
// AL_FarNum 의 절대값 + 1 개의 링크가 생성된다.
|
||||
|
||||
#ifdef _DEBUG
|
||||
std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj;
|
||||
#endif
|
||||
ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj;
|
||||
#endif //_DEBUG
|
||||
|
||||
if(AL_FarNum>0)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include "ZtCArray.H"
|
||||
#include "ZtCObjList.H"
|
||||
#include "ZCppMain/ZtCArray.H"
|
||||
#include "ZCppMain/ZtCObjList.H"
|
||||
|
||||
|
||||
using namespace std ;
|
||||
@ -30,6 +30,15 @@ namespace ZNsMain{namespace ZNsHide
|
||||
namespace ZNsHide*/}/*namespace ZNsMain*/
|
||||
|
||||
|
||||
template<typename T>
|
||||
class ZtCMy
|
||||
{ public: enum{EMyNum=1}; };
|
||||
|
||||
|
||||
template<typename T>
|
||||
class ZtCMy< ZNsMain::ZtCObjList<T> >
|
||||
{ public: enum{EMyNum=2}; };
|
||||
|
||||
|
||||
int main(int ArgiCnt, char** AppArgu)
|
||||
{
|
||||
@ -39,6 +48,15 @@ int main(int ArgiCnt, char** AppArgu)
|
||||
typedef ZNsMain::ZtCObjList<int> CListByInt;
|
||||
typedef ZNsMain::ZtCArray <int> CArrayInt ;
|
||||
|
||||
typedef ZtCMy<int> CMy1;
|
||||
typedef ZtCMy<CListByInt> CMy2;
|
||||
typedef ZtCMy<CArrayInt > CMy3;
|
||||
|
||||
cout<<"# CMy1::EMyNum="<<CMy1::EMyNum<<endl;
|
||||
cout<<"# CMy2::EMyNum="<<CMy2::EMyNum<<endl;
|
||||
cout<<"# CMy3::EMyNum="<<CMy3::EMyNum<<endl;
|
||||
|
||||
|
||||
CListByInt VO_IntList;
|
||||
CArrayInt VO_IntArr ;
|
||||
|
||||
@ -103,6 +121,8 @@ int main(int ArgiCnt, char** AppArgu)
|
||||
VO_IntArr .IterElement(&VO_CFunctor1 ); VO_CTuple._1=1 ;
|
||||
VO_IntArr .IterElement(ZCShowData4::Exec, &VO_CTuple);
|
||||
|
||||
cout<< "# Press Any Key to exit" << endl; cin.get();
|
||||
|
||||
return 0;
|
||||
}/*
|
||||
int main(int ArgiCnt, char** AppArgu)*/
|
||||
|
Reference in New Issue
Block a user