Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!mmdf From: DA3721A@acad.drake.edu Newsgroups: comp.sys.amiga.programmer Subject: Dynamic struct's Message-ID: <52955@nigel.ee.udel.edu> Date: 8 May 91 06:38:17 GMT Sender: mmdf@ee.udel.edu Lines: 30 I am currently working on programming a fairly simple database in C. The program will allow the user to specify the number of fields in the database and their names. My question is: How does one dynamically declare a struct for accessing the correct number of fields? In other words, rather than doing struct { int field1; char field2; int field3; } record; I would like to do something like struct { int field1; char field2; . . . int fieldx; } record; where 'x' in 'fieldx' is the number of fields as specified by the user. Note that the types in the struct are not important here, they're just for the example. Can anybody help me out on this one? I hope I explained things clearly :) Thanks in advance, David Aschbrenner