我有一个问题,这个struct contructor当我尝试编译这段代码:
typedef struct Node
{
Node( int data ) //
{
this->data = data;
previous = NULL; // Compiler indicates here
next = NULL;
}
int data;
Node* previous;
Node* next;
} NODE;
当我来这个错误发生时:
\linkedlist\linkedlist.h||In constructor `Node::Node(int)':|
\linkedlist\linkedlist.h|9|error: `NULL' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|
最后一个问题是结构,但它工作正常,当它在我的main.cpp,这一次它在一个头文件,并给我这个问题。我使用Code :: Blocks编译这个代码