Aha, thanks for answering. I used struct and was told I need a hash function so I changed to pair believing that it should have be implemented...