A
Allan Bruce
I am making my own linked list implementation just to get some basic
knowledge of slightly more advanced C++. I have the class below, but I get
an error saying "error C2629: unexpected 'Node ('" which is on the line for
the overlaoded constructor Node(char xiType)
Can anybody tell me where I am going wrong?
Thanks
Allan
#include <iostream>
class Node
{
public:
Node();
Node(char xiType);
virtual ~Node();
void SetNextLink(Node *xiNode){NextNode = xiNode);
void SetPrevLink(Node *xiNode){PrevNode = xiNode);
Node *GetPrevLink(){return PrevNode;}
Node *GetNextLink(){return NextNode;}
void SetData(void *xiData){Data = xiData;}
void *GetData(){return Data;}
private:
Node *NextNode;
Node *PrevNode;
void *Data;
bool Tail;
bool Head;
};
knowledge of slightly more advanced C++. I have the class below, but I get
an error saying "error C2629: unexpected 'Node ('" which is on the line for
the overlaoded constructor Node(char xiType)
Can anybody tell me where I am going wrong?
Thanks
Allan
#include <iostream>
class Node
{
public:
Node();
Node(char xiType);
virtual ~Node();
void SetNextLink(Node *xiNode){NextNode = xiNode);
void SetPrevLink(Node *xiNode){PrevNode = xiNode);
Node *GetPrevLink(){return PrevNode;}
Node *GetNextLink(){return NextNode;}
void SetData(void *xiData){Data = xiData;}
void *GetData(){return Data;}
private:
Node *NextNode;
Node *PrevNode;
void *Data;
bool Tail;
bool Head;
};