Skip to the content.

Generic Data stuctures using C

Info

typedef struct llnode { t_gen data; //< Pointer to the data to be stored in link list struct llnode *nxt; //< Pointer to next node in list struct llnode *prv; //< Pointer to prev node in list } t_llnode;

* Abstractness: The operations/procedures for each data structure is abstracted to the user by using function pointers, thus creating a psuedo class like structure
```markdown
t_linklist *l;
t_dparams dp;

// Data type specific operations to be given to data structure
init_data_params(&dp, eSTRING);

// Create a string XOR link list
l = create_link_list("STRING XORLL",eXOR_LINKLIST, &dp);


// Add elements to linklist
l->add(l, "Hello");
l->add(l, "World");

// print linklist
l->print(l);

// Destroy linklist
l->destroy(l);

LIST OF DATA STRUCTURES

ALGORITHMS

Code Documentation

CONFIGURE

Def.make change flags

BUILD

$ make clean; make all

RUN

$ ./foo.out