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?

my includes

#include <string.h>
#include <stdlib.h>

my error

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.

Answers


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.


Need Your Help

GoogleMaps MarkerClusterer InfoWindow Position

javascript google-maps google-maps-api-3 marker markerclusterer

I have a problem with the position of the markercluster's infoWindow. It doesn't show up at the marker position. Instead it is positioned on the upper left corner of the map. Here is my code:

Why can I pass a boost map_list_of to a function that takes a map, but not a constructor?

c++ boost constructor stl stdmap

I'm trying to construct an object that takes a std::map as a parameter, by passing it the map contents using boost map_list_of.