Advertisement
dllbridge

Untitled

Feb 16th, 2023
892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.27 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6. #include   <stdio.h>
  7.  
  8.  
  9.  
  10. int n = 9;
  11. ///////////////////////////////////////////////////////////////////
  12. class Ctt
  13. {
  14.  
  15.  
  16.     public:
  17.     int t1;
  18.    
  19.     int t2;
  20.    
  21.     int sum();
  22.  
  23. };
  24.  
  25.  
  26.  
  27.  
  28.  
  29. ////////////////////////////////////////////////////////////////////////
  30. int main()                                                            //
  31. {
  32.    
  33.  
  34.     Ctt tt;
  35.    
  36.     tt.t1 = 10;
  37.     tt.t2 = 33;
  38.  
  39.    
  40.     printf("tt.sum  =  %d\n", tt.sum() );
  41. }
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. ////////////////////////////////////////////////////////////
  50. int Ctt::sum()                                                 //
  51. {
  52.        
  53.     return t1 + t2;    
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. /*
  79.  
  80. #include   <stdio.h>
  81.  
  82.  
  83.  
  84. int n = 9;
  85. ///////////////////////////////////////////////////////////////////
  86. struct lkjdfg
  87. {
  88.    
  89.     int t;
  90.    
  91.     int t2;
  92.    
  93.     char szName[100];
  94. };
  95.  
  96.  
  97. void foo(lkjdfg *);
  98.  
  99.  
  100. ////////////////////////////////////////////////////////////////////////
  101. int main()                                                            //
  102. {
  103.    
  104.  
  105.     lkjdfg  arr[30];
  106.    
  107.     arr[0].t2 = 1234567;
  108.  
  109.    
  110.     foo(arr);
  111.  
  112. return 0;
  113. }
  114.  
  115.  
  116. //////////////////////////////////////////////////////////////////////////
  117. void foo(lkjdfg *p)
  118. {
  119.    
  120.     printf("arr[1].t  =  %d\n", p->t );                
  121.     printf("arr[1].t2 =  %d\n", p->t2);    
  122. }
  123.  
  124.  
  125. */
  126.  
  127.  
  128.  
  129.  
  130. //                                                                             (   )      
  131. //                                                                            (    )
  132. //                                                                             (    )
  133. //                                                                            (    )
  134. //                                                                              )  )
  135. //                                                                             (  (                  /\
  136. //                                                                              (_)                 /  \  /\
  137. //                                                                      ________[_]________      /\/    \/  \
  138. //                                                             /\      /\        ______    \    /   /\/\  /\/\
  139. //                                                            /  \    //_\       \    /\    \  /\/\/    \/    \
  140. //                                                     /\    / /\/\  //___\       \__/  \    \/
  141. //                                                    /  \  /\/    \//_____\       \ |[]|     \
  142. //                                                   /\/\/\/       //_______\       \|__|      \
  143. //                                                  /      \      /XXXXXXXXXX\                  \
  144. //                                                          \    /_I_II  I__I_\__________________\
  145. //                                                                 I_I|  I__I_____[]_|_[]_____I
  146. //                                                                 I_II  I__I_____[]_|_[]_____I
  147. //                                                                 I II__I  I     XXXXXXX     I
  148. //                                                               E-mail:    dllbridge@gmail.com                
  149.  
  150.  
  151.  
  152.  
  153.  
  154. /*
  155.  
  156.  
  157.  
  158. #include   <stdio.h>
  159.  
  160.  
  161.  
  162. int n = 9;
  163. ///////////////////////////////////////////////////////////////////
  164. struct lkjdfg
  165. {
  166.    
  167.     int t;
  168.    
  169.     float f;
  170.    
  171.     int t2;
  172.    
  173.     char szName[100];
  174. };
  175.  
  176.  
  177. void foo(lkjdfg *);
  178.  
  179.  
  180. ////////////////////////////////////////////////////////////////////////
  181. int main()                                                            //
  182. {
  183.    
  184.  
  185.     lkjdfg  arr[30];
  186.    
  187.     lkjdfg  tt;
  188.    
  189.     tt.f = 3.14;
  190.    
  191.     arr[1].t2 = 1234567;
  192.  
  193.     tt.t = 5;  
  194.    
  195.     foo(&tt);
  196.  
  197. return 0;
  198. }
  199.  
  200.  
  201. //////////////////////////////////////////////////////////////////////////
  202. void foo(lkjdfg *p)
  203. {
  204.    
  205.     printf("arr[1].t  =  %d\n", p->t );                
  206.     printf("arr[1].t2 =  %d\n", p->t2);    
  207. }
  208.  
  209. */
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement