T
Timothy V
Hi,
I like doing things myself because it helps me to learn languages. I'm in a
little trouble at the moment which someone might be able to help me.
I'm trying to create a list class. I have a struct which points to another
struct and so on:
private struct node
{
public object item;
public node next;
}
The problem is, it won't let me compile because it says:
Struct member 'List.node.next' of type 'List.node' causes a cycle in the
structure layout
Is there a way around this?
Thanks in advance,
Timothy.
I like doing things myself because it helps me to learn languages. I'm in a
little trouble at the moment which someone might be able to help me.
I'm trying to create a list class. I have a struct which points to another
struct and so on:
private struct node
{
public object item;
public node next;
}
The problem is, it won't let me compile because it says:
Struct member 'List.node.next' of type 'List.node' causes a cycle in the
structure layout
Is there a way around this?
Thanks in advance,
Timothy.