For the following Maps unable to insert into the Map
map<string, double> doubleProps = 4;
map<string, int32> intProps = 5;
map<string,string> stringProps=6;
Here are the following which I have tried , but its not working
doubleProps["key"]="value" //doesn't work
*(doubleProps["key"]).insert("value") //doesn't work
doubleProps.insert("key","value")
This is the way to insert into a map in protobuf object in c++
(*mutable_stringprops())["key"]=value
https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#map-fields
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With