[comp.lang.c] Dynamic data definitions in C

karlth@rhi.hi.is (Karl Thoroddsen) (02/25/91)

I have implemented linked lists in the following manner:

typedef int DATA

struct LIST 	{
		DATA *data;
		LIST *next;
	    	}

void create(struct LIST *list) etc. etc(other functions).
This is then compiled and can be linked into my programs.

Now I have defined the DATA to be 'int', but what if I needed to use
2+ lists in my program, each with different data definitions(int, float etc)?   
So my question is: Is it possible to define data structures(DATA) at runtime 
for example to create(name,DATADEF)?

Thanks in advance


-- 
Karl Thoroddsen             Computer Science           University of Iceland
----------------------------------------------------------------------------
----------------------------------------------------------------------------