Set_TelpoornOo.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #include<iostream>
  2. using namespace std;
  3. typedef struct uInt_n{
  4. int n1,n2;
  5. uInt_n(int N_1,int N_2):n1(N_1),n2(N_2){
  6. }
  7. void Cout_up(){
  8. cout <<n1 <<" :"<<n2 <<";"<<endl;
  9. }
  10. }n_lotMeaker_Mn;
  11. //template<int Xn,int Ys>
  12. class obj_pint{
  13. public:
  14. virtual uInt_n Get_out() = 0;
  15. };
  16. template<int Xn,int Ys>
  17. class Pintione:obj_pint{
  18. protected:
  19. n_lotMeaker_Mn nMMnor;
  20. private:
  21. template<int nX,int sY>
  22. void Pintf_oRtf(Pintione<nX,sY> mInt_n){
  23. cout <<"MInder:: 1 ..: ";
  24. nMMnor.Cout_up();
  25. cout <<"MInder:: 2 ..: ";
  26. mInt_n.Get_out().Cout_up();
  27. cout <<"endl frommnnr;"<< endl;
  28. }
  29. public:
  30. Pintione():nMMnor(Xn,Ys){
  31. }
  32. template<int tx,int ty>
  33. Pintione(Pintione<tx,ty> ptxy):nMMnor(tx,ty){
  34. }
  35. template<int nX,int sY>
  36. obj_pint * nKer_PintUp(Pintione<nX,sY> mInt_n){
  37. Pintf_oRtf<nX,sY>(mInt_n);
  38. return new Pintione<Xn-nX,Ys-sY>();
  39. }
  40. uInt_n Get_out(){
  41. return nMMnor;
  42. }
  43. };
  44. int main(){
  45. obj_pint *oPinter;
  46. Pintione<2,5> iPing_25;
  47. Pintione<1,4> iPint_14;
  48. oPinter = iPing_25.
  49. nKer_PintUp(iPint_14);
  50. oPinter->Get_out();
  51. return 0;
  52. }