Horje
check if a word is in map c++ Code Example
check if a word is in map c++
std::string key = "toto";

std::map<std::string, int> rule = {
	{ "input" , 1 },
    { "output", 2 },
    { "all"   , 3 }
};

if (rule.count(key) == 0) {
	std::cout << key << " not Found" << std::endl;
}




Cpp

Related
how to use for c++ Code Example how to use for c++ Code Example
c++ function inside main Code Example c++ function inside main Code Example
namespace c++ Code Example namespace c++ Code Example
sum of 2 arrays c++ Code Example sum of 2 arrays c++ Code Example
binary to int c++ bitset Code Example binary to int c++ bitset Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8