{Array;
} ExpCount (int N)
{Count=0; (int i=0; i lt; NowCount; i ++)
{((Array [i]). GetExperience () gt; N)
{
++ Count;
}
} Count;
} PrintAll ()
{lt;lt;laquo;--------------------------------------------------------------------------------------------------------------------------------raquo;lt;lt;endl;lt;lt;laquo;SNameNameFNameGenderBirth DateOrganizationSpecialtyPositionExperienceSalaryraquo;lt;lt;endl;lt;lt;laquo;--------------------------------------------------------------------------------------------------------------------------------raquo;lt;lt;endl;(int i=0; i lt; NowCount; i ++)
{ lt; lt; Array [i] lt; lt; endl;
}
} PrintPerson ()
{lt;lt;laquo;---------------------------------------------------raquo;lt;lt;endl;lt;lt;laquo;SNameNameFNameGenderBirth Dateraquo;lt;lt;endl;lt;lt;laquo;---------------------------------------------------raquo;lt;lt;endl;(int i=0; i lt; NowCount; i ++)
{ lt; lt; (Person) Array [i] lt; lt; endl;
}
} Add (Employee amp; E)
{[NowCount]=E;
++ NowCount;
} Add (char SN [], char N [], char F [], bool G, int DD, int MM, int YYYY, char O [], Sp [], char P [ ], int S, int E)
{t (SN, N, F, G, DD, MM, YYYY, O ,, P, S, E); [NowCount]=t;
++ NowCount;
} ()
{
}
~ Organization ()
{
}
}; Organization :: NowCount=0; lt; class T gt; Iterator
{* I; :( Organization amp; t)
{= (T *) t.GetBase ();
}
amp; GetCurData ()
{* I;
}
amp; operator ++ ()
{* I +=1;
} amp; operator ++ (int)
{* I +=1;
}
amp; operator - ()
{* I-=1;
}
amp; operator - (int)
{* I-=1;
}
amp; operator=(T amp; t)
{I=t;
}
()
{}
~ Iterator ()
{}
};
Код класу Person
# pragma once
# include lt; cstring gt;
# include lt; iostream gt; namespace std; Date
{DD; MM; YYYY; () {} (int D, int M, int Y)
{= D;=M;=Y;
}
}; Person
{SName [32]; Name [32]; FName [32]; Gender;
: Date BDate; * SetSName (char * SN)
{(SName, SN); SName;
} * SetName (char * N)
{(Name, N); Name;
} * SetFName (char * FN)
{(FName, FN); FName;
} amp; SetGender (bool G)
{= G; Gender;
} * SetDate (int DD, int MM, int YYYY)
{. DD=DD; .MM=MM; .YYYY=YYYY; amp; BDate;
}
() {} (char SN [], char N [], char F [], bool G, int DD, int MM, int YYYY) :( G), BDate (DD, MM , YYYY)
{(SName, SN); (Name, N); (FName, F);
}
(Person amp; P)
{= P.Gender; (SName, P.SName); (Name, P.Name); (FName, P.FName) ;. DD=P.BDate.DD; .MM= P.BDate.MM; .YYYY=P.BDate.YYYY;
} ~ Person () {}
istream amp; operator gt; gt; (istream amp; is, Person amp;);
ostream amp; operator lt; lt; (ostream amp ;, Person amp;);
amp; operator () (char SN [], char N [], char F [], bool G, int DD, int MM, int YYYY)
{= G; .DD=DD; .MM=MM; .YYYY=YYYY; (SName, SN); (Name, N); (FName, F);
}
char * GetSName ()
{SName;