Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int arr[123];
- ///////////////////////////////////////////////////////////
- struct TT
- {
- TT *p;
- //---------------
- char szName[120];
- int old;
- } TT_Head, *Tail;
- int TT_size = 0;
- //////////////////////////////////////////////////////////
- int add_El(int x)
- {
- TT *p = (TT*)malloc(sizeof(TT));
- TT_size ++;
- p->old = x;
- if(TT_size == 0)
- {
- TT_Head.p = p;
- Tail = p;
- }
- else
- {
- Tail->p = p;
- Tail = p;
- }
- }
- //////////////////////////////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 0; i < 7; i++)
- {
- add_El(i+100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement