Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Changed description in unordered_map's count #710

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions unordered_map/count.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# count

**Description :** This function is used to determine if an element is in the map. It returns one if the element is in the map
else it returns zero.
**Description :** This function is used to determine if an element is in the map. More verbally, this function obtains the number of elements that match a specific key, but since this container (an unordered map) does not allow for duplicates, it only returns either 1 or 0.
So, it returns 1 if the element is in the map, else it returns 0.

**Example** :

Expand All @@ -14,8 +14,8 @@ else it returns zero.

int main (){
//Creates a map of Spanish Speaking Countries in the Caribbean and calls it SpanishSpeakingCaribbean
std::unordered_multimap<std::string,std::string> SpanishSpeakingCaribbean = {
{"Cuba","Havana"},
std::unordered_multimap<std::string, std::string> SpanishSpeakingCaribbean = {
{"Cuba", "Havana"},
{"Dominican Republic", "Santo Domingo"},
{"Puerto Rico", "San Juan"}
};
Expand Down