edit test.cpp
This commit is contained in:
@ -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;
|
||||
}/*
|
||||
|
Reference in New Issue
Block a user