Advertisement
dllbridge

Untitled

Jun 27th, 2023
1,124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1.  
  2.  
  3. //  The beginning of the file "main.cpp"
  4. //  - - - - - - - - - - - - - - - - - -
  5.  
  6. #include   <stdio.h>
  7. #include  "resource/Cdate.h"
  8.  
  9.  
  10.  
  11.  
  12. TT t1;
  13.  
  14.  
  15.  
  16. ////////////////////////////////////////////////////
  17. int main()                                        //
  18. {
  19.  
  20.  
  21.  
  22. return 0;  
  23. }
  24.  
  25.  
  26.  
  27. //  The beginning of the file "LL.h"
  28. //  - - - - - - - - - - - - - - - - - -
  29.  
  30. #include  <stdlib.h>
  31.  
  32. ///////////////////////////////////////////////
  33. struct TT
  34. {
  35.    
  36.    TT   *pNext;
  37.    
  38.    int   nDate;
  39.    
  40.    //////////////
  41.    
  42.    void add(int);
  43.  
  44.    
  45. };
  46.  
  47.  
  48.  
  49.  
  50. //  The beginning of the file "LL.cpp"
  51. //  - - - - - - - - - - - - - - - - - -
  52.  
  53. #include  "Cdate.h"
  54.  
  55.  
  56.  
  57. TT *pHead = 0,
  58.    *pTail = 0;  
  59.  
  60.  
  61. //////////////////////////////////////////////////////////
  62. void TT::add(int n)
  63. {
  64.        
  65.        
  66.     TT *p = (TT*)malloc(sizeof(TT));
  67.    
  68.     if(pHead == 0)
  69.     {
  70.        
  71.        pHead = p;  
  72.        
  73.     }
  74.     else
  75.     {
  76.        
  77.        pTail->pNext = p;   
  78.     }
  79.    
  80.     nDate = n;
  81.     pNext = 0;
  82.     pTail = p;
  83.    
  84. }
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement