I want to print the most visited sites/urls in the browser. : Below is the code that I have written in C++ and it is printing the wrong result for the 2nd and 3rd output line. I am not able to figure it out why it is happening.

Below is the code  which I have written and it is a completely functional code on visual studio. This code expects the one input file named urlMgr.txt whose content should be URLs. Below is the sample URLs which I am using it. 

/*
INPUT TO BE PASTED IN THE urlMgr.txt file so that program can fetch the input from this file. ANY HELP ON THIS WILL BE HIGHLY APPRECIATED.

*/
Code is also pasted below.

    #include <iostream>
    #include <string>
    #include <unordered_set>
    #include <algorithm>
    #include <fstream>
    #include <sstream>
    #include <functional>
    #include <unordered_map>
    #include <queue>
    using namespace std;
    
    class urlInfo
    {
    public:
    	urlInfo(string &url):urlName(url),hitCount(1)
    	{
    	}
    
    	int getHitCount() const
    	{
    		return hitCount;
    	}
    	
    	string getURL()
    	{
    		return urlName;
    	}
    
    	string getURL() const
    	{
    		return urlName;
    	}
    
    	void updateHitCount()
    	{
    		hitCount++;
    	}
    
    	void setHitCount(int count)
    	{
    		hitCount = count;
    	}
    
    private:
    	string urlName;
    	int hitCount;
    };
    
    class urlInfoMaxHeap
    {
    public:
    	bool operator() (urlInfo *url1, urlInfo *url2) const
    	{
    		if(url2->getHitCount() > url1->getHitCount())
    			return true;
    		else
    			return false;
    	}
    };
    
    
    bool operator==(const urlInfo &ui1,const urlInfo& ui2)
    {
    	//return (ui1.getURL().compare(ui2.getURL()) == 0) ? 1:0;
    
    	return (ui1.getURL() == ui2.getURL());
    }
    
    namespace std
    {
    	template <> struct hash<urlInfo>
    	{
    		size_t operator()(urlInfo const & ui)
    		{
    			return hash<string>()(ui.getURL());
    		}
    	};
    }
    
    class urlMgr
    {
    public:
    	urlMgr(string &fileName)
    	{
    		ifstream rdStr;
    		string str;
    		rdStr.open(fileName.c_str(),ios::in);
    		if(rdStr.is_open())
    		{
    			int len;
    			rdStr.seekg(0,ios::end);
    			len = rdStr.tellg();
    			rdStr.seekg(0,ios::beg);
    			str.reserve(len+1);
    			char *buff = new char[len +1];
    			memset(buff,0,len+1);
    			rdStr.read(buff,len);
    			rdStr.close();
    			str.assign(buff);
    			delete [] buff;
    		}
    		stringstream ss(str);
    		string token;
    
    		while(getline(ss,token,'\n'))
    		{
    			//cout<<endl<<token;
    			addUrl(token);
    		}
    
    	}
    
    
    	void addUrl(string &url)
    	{
    		unordered_map<string,urlInfo*>::iterator itr;
    		itr = urls.find(url);
    		if(itr == urls.end())
    		{
    			urlInfo *u = new urlInfo(url);
    			urls[url] = u;
    			maxHeap.push_back(u);
    		}
    		else
    		{
    			itr->second->updateHitCount();
    			urlInfo* u = itr->second;
    			vector<urlInfo*>::iterator vItr;
    			vItr = find(maxHeap.begin(),maxHeap.end(),u);
    			if(vItr!=maxHeap.end())
    			{
    				maxHeap.erase(vItr);
    				maxHeap.push_back(u);
    			}
    		}
    
    		make_heap(maxHeap.begin(),maxHeap.end(),urlInfoMaxHeap());
    	}
    
    	void releaseResources()
    	{
    		for_each(urls.begin(),urls.end(),[](pair<string,urlInfo*> p){
    			urlInfo* u = p.second;
    			delete u;
    		});
    	}
    
    	void printHeap()
    	{
    		for_each(maxHeap.begin(),maxHeap.end(),[](urlInfo* u){
    			cout<<endl<<u->getHitCount()<<"  "<<u->getURL();
    		});
    	}
    private:
    	unordered_map<string,urlInfo*> urls;
    	vector<urlInfo*> maxHeap;
    };
    
    
    int main()
    {
    	string fileName("urlMgr.txt");
    	urlMgr um(fileName);
    	um.printHeap();
    	um.releaseResources();
    	cout<<endl<<"Successfully inserted the data"<<endl;
    }