for(it=visited.begin(); it!=visited.end();++it)
{
if((*it).second>ttl){
++count;
}
}
What does the line if((*it).second>ttl) means here ?
For better understanding see this code please .... http://ideone.com/NY4ofJ . Thanks in Advance .
A map is a collection of pair ; with a key and a value. To access to the key you use the member first and to access to the value you use member second.
(*it).second or it->second dereference the iterator and get the second value of the pair contains in the map.
So, the value contained by the iterator is tested with the value contained by the ttl variable.