I tried including including #include <HashMap.h>
but it said library not found. And Map<String, Person> profiles = new HashMap<String, Person>();
says Map/HashMap
are not defined.
So does Particle support hashmap?
I tried including including #include <HashMap.h>
but it said library not found. And Map<String, Person> profiles = new HashMap<String, Person>();
says Map/HashMap
are not defined.
So does Particle support hashmap?
How did you try to include that library? Did you use the library system, or did you add the files manually?
I just included the line #include <HashMap.h>
(and also tried #include "HashMap.h"
) at the top of my profile file.
And where is the IDE supposed to get those files from? (Including things like that won’t work for any library)
https://docs.particle.io/guide/getting-started/build/photon/#using-libraries
It looks like this is an Arduino library that has not been brought to Particle world yet. It can be found here:
http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/libraries/HashMap/HashMap.h?view=log
I think that code would just work in Particle or you could use std::map instead.