aboutsummaryrefslogtreecommitdiff
path: root/test.c
blob: 54a472718ef19e792f2e5ae9784e59840dda7b3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Usage of list

#include <stdio.h>
#include <stdlib.h>
#include "../libs/llist.h"

typedef struct{
	int a;
	double b;
} st;

int main(){
	
	st s1 = {.a = 1, .b = 2.0};
	double c = 3.0;
	node *n1 = Node(&s1, sizeof s1);
	llist l = Llist("lista", NULL);
	
	insert(&l, n1);
	//l.head = n1;
	printf("%d\n%f\n", ((st*)l.head->data)->a, s1.b);

	return 0;
	
}