Answers for "check if map key has alue cpp"

C++
2

check if map key has alue cpp

#include<map>

int main(){

  	map<int,char> m;
  	
  	char ch = '!';
  
	if (m.find(ch) != m.end()) {
		std::cout << "Key found";
	} else {
		std::cout << "Key not found";
	}
  
	return 0;
}
Posted by: Guest on August-28-2020

Browse Popular Code Answers by Language