Question - Dynamic Structures

I'm wanting to use dynamic structures for an application I'm trying to build. The inline structure has to change depending on the structure that is declared by the previous variable. Here's an example code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct ObjectX
{
	unsigned int ObjNameLength;
	char ObjName;     // Can't use previous variable to describe the length?
	int NumChildren;
	struct Children NumChildren;
};   // Are these ";" really necessary for structure definitions?

struct Children
{
	unsigned int ChildClassNameLength;
	char ChildClassName;
	struct ChildClassName;  // This structure needs to change based on the value of the previous variable.  And search for the class name which has the same value as the previous variable.
};
Topic archived. No new replies allowed.