You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
#include <cstddef>
With this change, I can compile successfully.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: