Syntax problem switching from Delphi to C++

Hi

Hopefully this is simple. I am trying to implement FlexCel in my project and strugging so I am trying to do a simple dummy form which exports to excel using the one of the classes. In the Demo it states that I should have the following code

"Report.Values['property_name']:=property_value;"
"property_name" is the name you used in the template (#.property_name)
"property_value" is the value you want for that cell.

I assume this is Delphi coding, what is throwing me off is ['xxxxx'} part. What is the C++ equivalent? I am not sure how to pass this argument to Values in C++ syntax


Thanks for your help in advance
An STL map, is a template container that can associate a string "property_name" with a value of some arbitrary type.

For example:
1
2
3
4
5
6
#include <map>
#include <string>
//...
std::map<std::string, int> properties;
properties["property_name1"] = 10;
properties["property_name2"] = 20;

See the reference section:
http://cplusplus.com/reference/stl/map/
Topic archived. No new replies allowed.