Ask Your Question

Revision history [back]

This is not really a ROS related question... This is about regular programming...

So, if you receive ERROR you want to check if there is already an error stored in the map, and if not, add it? You can use the Standard std::map functions:

  • count to check if this element is already in the map
  • find to find it
  • insert to add a new one