GSM (gmericle@VT.EDU)
Sun, 13 Feb 2000 16:30:41 -0500
Message-ID: <00ab01bf7669$9474f600$0101a8c0@campus.vt.edu> Date: Sun, 13 Feb 2000 16:30:41 -0500 From: GSM <gmericle@VT.EDU> Subject: [CS3304_1381] forward type declaration
I have a node type (record). Inside of this record, I want to have 2
pointers to node types (a left child and a right child). The compiler
won't let me put pointers to the record in the record definition. Is there
any way to use the forward keyword in Pascal to accomplish this?
Ex:
type NodeType = record
lchild, rchild : ^NodeType;
end;
I also tried:
type NodePtr = ^NodeType; forward;
type NodeType = record
lchild, rchild : NodePtr;
end;
but the compiler didn't like that either...
any ideas?
thanks,
Grant
This archive was generated by hypermail 2.0b3 on Sun Feb 13 2000 - 16:29:16 EST