Hi,
is there any document or text describing forward references?
It is kinda strange, i implemented a list structure which is kinda like this:

struct list(T)
{
private:

struct node
{
T val;
node* next;
node* prev;
}

node* head;
node* last;
size_t size;

 .....
}

The thing is when i implement following struct:

struct Tre
{
list!Tre a;
}

theoretically it should be constructable. But it gives me out a compiler error about Forward reference. Ok maybe the compiler at this point cant do that but ...

The strange thing is i somehow managed earlier without knowing to do exactly this in a much more complicated struct.
Can somebody enlighten me about this?





Reply via email to