When trying to compile this project, I received the following error:
g++ main.cpp corpus.cpp slda.cpp utils.cpp opt.cpp -o slda -lgsl -lm -lgslcblas
In file included from corpus.cpp:22:0:
corpus.h: In constructor ‘document::document()’:
corpus.h:39:17: error: ‘NULL’ was not declared in this scope
words = NULL;
^
corpus.h: In destructor ‘document::~document()’:
corpus.h:55:22: error: ‘NULL’ was not declared in this scope
if (words != NULL)
Hello,
When trying to compile this project, I received the following error:
Looking at [http://stackoverflow.com/questions/462165/error-null-was-not-declared-in-this-scope](this thread) suggests that the cstddef library needs to be included in corpus.h.
With this change, I can compile successfully.