dllbridge

Untitled

Mar 22nd, 2026
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.94 KB | None | 0 0
  1.  
  2. #include   <stdio.h>
  3. #include  <locale.h>       //  çäåñü "æèâ¸ò" setlocale(LC_ALL, "rus");
  4. #include  <stdlib.h>
  5. #include  <string.h>
  6.  
  7. //////////////////////////////////////////////////////////////
  8. struct T
  9. {
  10.     char sz[15];
  11.     float     n;
  12.     /////////////////////////
  13.     T()
  14.     {
  15.         printf("Hello\n");
  16.         strcpy(sz, "empty");
  17.         n = 0.07;  
  18.     }
  19.    
  20.     T(const T &r)
  21.     {
  22.        
  23.         printf("SONY\n");
  24.     }
  25.     /////////////////////////
  26.     void print();  
  27. };
  28.  
  29.  
  30. //////////////////////////////////////////////////////////////
  31. void T:: print()
  32. {
  33.    
  34.     printf("sz = %s, n = %7.2f\n", sz, n); 
  35. }
  36.  
  37. void foo(struct T);
  38. //////////////////////////////////////////////////////////////
  39. int main()
  40. {
  41.    
  42.     T t_1, t_2, t_3;
  43.    
  44.     T t_77 = t_1;
  45.     t_3.n = 299.99;
  46.     t_3.print();
  47.     t_2.print();
  48.     foo(t_1);
  49.    
  50. }
  51.  
  52. //////////////////////////////////////////////////////////////
  53. void foo(struct T t_x)
  54. {
  55.    
  56.     printf("t_x.sz = %s, t_x.n = %7.2f\n", t_x.sz, t_x.n); 
  57. }
  58.  
  59.  
Advertisement
Add Comment
Please, Sign In to add comment