class Way {
private:
    std::vector<Node> nodesCollection; 
public:
    Way();
    Way(const Way& orig);
    virtual ~Way();
    void SetNodesCollection(std::vector<Node> nodesCollection);
    std::vector<Node> GetNodesCollection() const;
};
I added vector as a property and I'm accessing that vector from following class and adding items.
Way wayNode;
 for (; WayIter!=wayNodes.end(); ++WayIter)
{
    const JSONNode& arrayNode = *WayIter;
    if (arrayNode.find("ref") != arrayNode.end() )
    {
        std::string id = arrayNode.find("ref")->as_string();
        if(nodesMap.find(id) != nodesMap.end())
        {
            wayNode.GetNodesCollection().push_back(nodesMap.find(id)->second);
        }
    }
}
but items are not adding to "nodesCollection". its count is zero. that adding object is not null.
I need some help to sort out this. I'm new to c++.
Thanks in advance.
 
     
    