C (142/301)

From:Allan Odgaard
Date:21 Aug 99 at 09:14:29
Subject:Re: Dynamic Database

From: Allan Odgaard <Duff@DIKU.DK>

On 20-Aug-99, DonaldWM@stonelawdrive.freeserve.co.uk wrote:

> [...] Does anyone know if it is actually possible to do this at all?

Is this your question? If I've understood your explanation correctly then It'd
say yes.

You use 'new' to create instances of structures. It sounds like you have a
limited amount of different structures (not including the size) and so it
shouldn't be a problem to declare all of them, and let them be a subclass of
some base-structure. Then implement your field-container as an array of this
base-structure... the proper reading would probably be something about
polymorphism in C++.

Regards Allan



URL: http://www.DIKU.dk/students/duff/


Everything should be made as simple as possible, but not simpler.
-- Albert Einstein