stdlib not working in nxtOSEK
I am programming the Lego Nxt Brick with nxtOSEK in C++. It seems that the stdlib.h library is not working, but the string.h library works fine. Has anyone seen this before?
#include <string.h> #include <stdlib.h>
LegoQueue.cpp: In function ‘void queue::debugstring(char*)’: LegoQueue.cpp:131: error: ‘itoa’ was not declared in this scope
Even though the c++ documentation for itoa (http://www.cplusplus.com/reference/cstdlib/itoa/) clearly states that itoa should be in stdlib.h, itoa is not declared. Any help would be appreciated, thanks.
If you are compiling your code as C++, you should prefer to write your include directives this way:
#include <cstdlib> #include <cstring>
Please let me know if it helps.