G
Greg2fs
Hello, I am trying to create a stack (LILO) doing like that:
struct BUFFERS
{
BUFFERS* prev;
BUFFERS* next;
};
BUFFERS* last;
BUFFERS* first;
last=new BUFFERS;
last->next=NULL;
last->prev=NULL;
first=last;
last->next=new BUFFERS;
last->next->prev=last;
last->next->next=NULL;
I can compile that under Visual studio but not under code::blocks,
witch says:
"error: base operande of << -> >> has non pointer type <<BUFFERS>>"
Is it wrong to do that, or is it a code::blocks bug, how can I do ?
Thanks
struct BUFFERS
{
BUFFERS* prev;
BUFFERS* next;
};
BUFFERS* last;
BUFFERS* first;
last=new BUFFERS;
last->next=NULL;
last->prev=NULL;
first=last;
last->next=new BUFFERS;
last->next->prev=last;
last->next->next=NULL;
I can compile that under Visual studio but not under code::blocks,
witch says:
"error: base operande of << -> >> has non pointer type <<BUFFERS>>"
Is it wrong to do that, or is it a code::blocks bug, how can I do ?
Thanks