No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I rote this code in my program JSONNode::const_iterator iter = root.begin(); for (; iter!=root.end(); ++iter) { const JSONNode& arrayNode = *iter; std::string type = arrayNode["type"].as_string(); if(type == "node") { std::string id = arrayNode["id"].as_string(); double lat = arrayNode["lat"].as_float(); double lon = arrayNode["lon"].as_float(); Node node; node.SetId(id); node.SetLatitude(lat); node.SetLongitude(lon); nodesMap.insert( std::pair<std::string, Node>(id, node) … |
|
I created following classes in my program. Way.h class Way { private: std::string id; std::string name; public: Way(); Way(const Way& orig); void SetName(std::string name) { this->name = name; } std::string const & GetName() const { return name; } void SetId(std::string id) { this->id = id; } std::string const & GetId() … |