Please check why no output is being displayed
Https://ide.codingblocks.com/s/286966
you have to pass the map by reference
so that changes done in function may reflect back to main()
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask