2.2.7.5.3 omap::Get

Contents

Description

Get value by key

Syntax

BOOL Get( _TemplType key, _TemplType2 & val )

Parameters

key
[input] The key to be checked if in the map
val
[output] Match value to return if the key is found

Return

Returns TRUE if the key is found, return FALSE if key is missing or invalid

Examples

EX1

void map_Get_ex()
{
	omap<int, string> m1;
	m1.Set(100, "Hello");
	m1.Set(200, "World");
	string str;
	if (m1.Get(200, str))
		printf("Found value at 200: %s\r\n", str);
}

Remark

See Also

Header to Included