edit test.cpp

This commit is contained in:
2021-03-04 16:10:09 +09:00
parent 5f52208a3f
commit 3b17e42092
2 changed files with 40 additions and 19 deletions

View File

@ -46,36 +46,35 @@ int main(int ArgiCnt, char** AppArgu)
VO_IntList.AddTail(9);
_FFS_(ZCShowData)
typedef ZtStTuple<int> ZCTuple;
ZCTuple VO_CTuple; VO_CTuple._1 = 1;
_FFS_(ZCShowData1)
(ZTypInt AiInt)
{
cout<<"# Elem : "<< AiInt << endl;
}/*
(ZTypInt AiInt)*/
_FFC_(ZCShowData)
_FFC_(ZCShowData1)
class ZCFunctor1
{
private:
ZTypInt mi_Index;
public :
ZCFunctor1(){mi_Index=0;}
void operator()(int ArgiValue)
{ cout<<"# index="<<++mi_Index<<", Value="<<ArgiValue<<endl; }
public :
};/*
class ZCFunctor1*/
_FFS_(ZCShowData2)
(ZTypInt AiInt, ZCTuple& VR_CTuple)
{
cout<<"# Elem : "<< AiInt << VR_CTuple._1++ << endl;
}/*
(ZTypInt AiInt, ZCTuple& VR_CTuple)*/
_FFC_(ZCShowData2)
//ZNsHide::ZCFunctor1 VO_CFunctor1;
ZCFunctor1 VO_CFunctor1;
ZNsHide::ZCFunctor1 VO_CFunctor1;
/* ZCFunctor1 선언이 main() 바깥에 있어야 하는 문제를 해결할 수 없을까. */
VO_IntList.IterElement(ZCShowData::Exec);
VO_IntList.IterElement(&VO_CFunctor1 );
VO_IntList.IterElement(ZCShowData1::Exec);
VO_IntList.IterElemRef(ZCShowData2::Exec);
VO_IntList.IterElement(&VO_CFunctor1 );
return 0;
}/*