Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!isgate!krafla!karlth From: karlth@rhi.hi.is (Karl Thoroddsen) Newsgroups: comp.lang.c Subject: Dynamic data definitions in C Keywords: Linked lists Message-ID: <2826@krafla.rhi.hi.is> Date: 25 Feb 91 12:08:06 GMT Organization: University of Iceland Lines: 24 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 ---------------------------------------------------------------------------- ----------------------------------------------------------------------------