1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #include<iostream>
- using namespace std;
- typedef struct uInt_n{
- int n1,n2;
- uInt_n(int N_1,int N_2):n1(N_1),n2(N_2){
- }
- void Cout_up(){
- cout <<n1 <<" :"<<n2 <<";"<<endl;
- }
- }n_lotMeaker_Mn;
- //template<int Xn,int Ys>
- class obj_pint{
- public:
- virtual uInt_n Get_out() = 0;
- };
- template<int Xn,int Ys>
- class Pintione:obj_pint{
- protected:
- n_lotMeaker_Mn nMMnor;
- private:
- template<int nX,int sY>
- void Pintf_oRtf(Pintione<nX,sY> mInt_n){
- cout <<"MInder:: 1 ..: ";
- nMMnor.Cout_up();
- cout <<"MInder:: 2 ..: ";
- mInt_n.Get_out().Cout_up();
- cout <<"endl frommnnr;"<< endl;
- }
- public:
- Pintione():nMMnor(Xn,Ys){
- }
- template<int tx,int ty>
- Pintione(Pintione<tx,ty> ptxy):nMMnor(tx,ty){
- }
- template<int nX,int sY>
- obj_pint * nKer_PintUp(Pintione<nX,sY> mInt_n){
- Pintf_oRtf<nX,sY>(mInt_n);
- return new Pintione<Xn-nX,Ys-sY>();
- }
- uInt_n Get_out(){
- return nMMnor;
- }
- };
- int main(){
- obj_pint *oPinter;
- Pintione<2,5> iPing_25;
- Pintione<1,4> iPint_14;
- oPinter = iPing_25.
- nKer_PintUp(iPint_14);
- oPinter->Get_out();
- return 0;
- }
|