File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed
Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ PROJECT (LINK_TABLE)
2+ CMAKE_MINIMUM_REQUIRED (VERSION 2.9)
3+ INCLUDE_DIRECTORIES (./include )
4+ AUX_SOURCE_DIRECTORY (./src DIR_SRC)
5+ ADD_EXECUTABLE (./bin ${DIR_SRC} )
Original file line number Diff line number Diff line change 1+ mkdir build
2+ cd build
3+ cmake ..
4+ make
Original file line number Diff line number Diff line change 1+ #include <stdio.h>
2+ #include <stdlib.h>
Original file line number Diff line number Diff line change 1+ #include "../include/head.h"
2+ int main (){
3+ struct body_link {
4+ void * data ;
5+ int type ;
6+ struct body_link * next ;
7+ };
8+ struct head_link {
9+ char * name ;
10+ struct body_link * head ;
11+ struct body_link * * location ;
12+ int offset ;
13+ struct head_link * next ;
14+ };
15+ return 0 ;
16+ }
17+
18+ (struct head_link * )hcreate (){
19+ struct head_link * temp ;
20+ temp = (struct head_link * )(malloc (sizeof (struct head_link )));
21+ temp -> head = (struct body_link * )(malloc (sizeof (struct body_link )));
22+ temp -> location = & (temp -> head );
23+ temp -> offset = 0 ;
24+ return temp ;
25+ }
26+ int hadd (struct head_link * head_hl ){
27+ struct head_link * temp ;
28+ temp = (struct head_link * )(malloc (sizeof (struct head_link )));
29+ head_hl -> next = temp ;
30+ temp -> head = head_hl -> head ;
31+ temp -> location = (struct body_link * )(malloc (sizeof (struct body_link )));
32+ temp -> offset = (head_hl -> offset + 1 );
33+ return 0 ;
34+ }
You can’t perform that action at this time.
0 commit comments