I am writing my own library for using with my Arduino. In my code, if I set a pointer I have declared to
NULL, such as
I get the error
error: ‘NULL’ was not declared in this scope
I need to initialize it to
NULL as I am using pointers to implement a list.
If I use
NULL directly in the program in the IDE, I do not get this error. This seems to be happening only when it is a part of the library code.
How do I correct this? Is there any alternative keyword to use? Or do I have to include some library?